pnor : generate partition table

Implement a class that, upon construction, generates the virtual PNOR
partition table. The virtual PNOR is typically a subset of the full PNOR
image, by choosing partitions of interest.

The generation is based on upon information read from the
PNOR partition files and table of contents (toc) file.

Provide an interface to the virtual PNOR partition table.

Change-Id: I7a68e3833b8cf66e92eb6ca274f6a3c376ce0add
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/common.h b/common.h
index 83ead0c..90a0fc9 100644
--- a/common.h
+++ b/common.h
@@ -46,6 +46,10 @@
 
 extern void (*mbox_vlog)(int p, const char *fmt, va_list args);
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void mbox_log_console(int p, const char *fmt, va_list args);
 
 __attribute__((format(printf, 2, 3)))
@@ -100,4 +104,8 @@
 
 char *get_dev_mtd(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* COMMON_H */