summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2018-08-08 16:44:24 +0930
committerAndrew Jeffery <andrew@aj.id.au>2018-09-05 17:44:24 +0930
commit71eaa7329c8351e9d47ee05ece1ae7b486f3c81a (patch)
tree78d4840d01e83538f0f9a2e0cb174ce9f9e751d1
parentf2587b0f4de9d45fa0c5197c43be48cd65dab4cc (diff)
downloadphosphor-mboxbridge-71eaa7329c8351e9d47ee05ece1ae7b486f3c81a.tar.gz
phosphor-mboxbridge-71eaa7329c8351e9d47ee05ece1ae7b486f3c81a.zip
flash: Drop __cplusplus guard
C++ concepts should go in C++ files. Change-Id: I7d3b16c4d176b51fb8bcf976744312632322c2a8 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
-rw-r--r--flash.h7
-rw-r--r--vpnor/flash.cpp2
-rw-r--r--vpnor/mboxd_pnor_partition_table.cpp5
-rw-r--r--vpnor/pnor_partition.cpp5
-rw-r--r--vpnor/test/write_patch.cpp2
-rw-r--r--vpnor/test/write_patch_resize.cpp3
-rw-r--r--vpnor/test/write_prsv.cpp2
-rw-r--r--vpnor/test/write_ro.cpp3
-rw-r--r--vpnor/test/write_rw.cpp2
9 files changed, 21 insertions, 10 deletions
diff --git a/flash.h b/flash.h
index acf8218..5b47769 100644
--- a/flash.h
+++ b/flash.h
@@ -9,10 +9,6 @@
#include "mbox.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int init_flash_dev(struct mbox_context *context);
void free_flash_dev(struct mbox_context *context);
int64_t copy_flash(struct mbox_context *context, uint32_t offset, void *mem,
@@ -23,7 +19,4 @@ int erase_flash(struct mbox_context *context, uint32_t offset, uint32_t count);
int write_flash(struct mbox_context *context, uint32_t offset, void *buf,
uint32_t count);
-#ifdef __cplusplus
-}
-#endif
#endif /* FLASH_H */
diff --git a/vpnor/flash.cpp b/vpnor/flash.cpp
index 3d512cb..2d58463 100644
--- a/vpnor/flash.cpp
+++ b/vpnor/flash.cpp
@@ -12,10 +12,10 @@
extern "C" {
#include "common.h"
+#include "flash.h"
}
#include "config.h"
-#include "flash.h"
#include "mboxd_pnor_partition_table.h"
#include "pnor_partition.hpp"
#include "pnor_partition_table.hpp"
diff --git a/vpnor/mboxd_pnor_partition_table.cpp b/vpnor/mboxd_pnor_partition_table.cpp
index 0f584a0..228ae5b 100644
--- a/vpnor/mboxd_pnor_partition_table.cpp
+++ b/vpnor/mboxd_pnor_partition_table.cpp
@@ -1,10 +1,13 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright (C) 2018 IBM Corp.
+extern "C" {
+#include "flash.h"
+}
+
#include "mboxd_pnor_partition_table.h"
#include "pnor_partition_table.hpp"
#include "common.h"
#include "mbox.h"
-#include "flash.h"
#include "pnor_partition_table.hpp"
#include "config.h"
#include "xyz/openbmc_project/Common/error.hpp"
diff --git a/vpnor/pnor_partition.cpp b/vpnor/pnor_partition.cpp
index 7961194..3ec4d22 100644
--- a/vpnor/pnor_partition.cpp
+++ b/vpnor/pnor_partition.cpp
@@ -1,9 +1,12 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright (C) 2018 IBM Corp.
+extern "C" {
+#include "flash.h"
+}
+
#include "pnor_partition.hpp"
#include "pnor_partition_table.hpp"
#include "config.h"
-#include "flash.h"
#include "mboxd_pnor_partition_table.h"
#include "xyz/openbmc_project/Common/error.hpp"
#include <phosphor-logging/log.hpp>
diff --git a/vpnor/test/write_patch.cpp b/vpnor/test/write_patch.cpp
index 1a3e4ee..a146bcf 100644
--- a/vpnor/test/write_patch.cpp
+++ b/vpnor/test/write_patch.cpp
@@ -12,7 +12,9 @@
#include "config.h"
#include "common.h"
#include "mbox.h"
+extern "C" {
#include "flash.h"
+}
#include "vpnor/test/tmpd.hpp"
diff --git a/vpnor/test/write_patch_resize.cpp b/vpnor/test/write_patch_resize.cpp
index 5d39802..ff2558b 100644
--- a/vpnor/test/write_patch_resize.cpp
+++ b/vpnor/test/write_patch_resize.cpp
@@ -13,7 +13,10 @@
#include "config.h"
#include "common.h"
#include "mbox.h"
+
+extern "C" {
#include "flash.h"
+}
#include "vpnor/test/tmpd.hpp"
diff --git a/vpnor/test/write_prsv.cpp b/vpnor/test/write_prsv.cpp
index f880476..b89b954 100644
--- a/vpnor/test/write_prsv.cpp
+++ b/vpnor/test/write_prsv.cpp
@@ -10,7 +10,9 @@
#include "common.h"
#include "mbox.h"
+extern "C" {
#include "flash.h"
+}
#include "vpnor/test/tmpd.hpp"
diff --git a/vpnor/test/write_ro.cpp b/vpnor/test/write_ro.cpp
index f0dd215..24a534a 100644
--- a/vpnor/test/write_ro.cpp
+++ b/vpnor/test/write_ro.cpp
@@ -10,7 +10,10 @@
#include "common.h"
#include "mbox.h"
+
+extern "C" {
#include "flash.h"
+}
#include "vpnor/test/tmpd.hpp"
diff --git a/vpnor/test/write_rw.cpp b/vpnor/test/write_rw.cpp
index 7760fc7..76b1525 100644
--- a/vpnor/test/write_rw.cpp
+++ b/vpnor/test/write_rw.cpp
@@ -10,7 +10,9 @@
#include "common.h"
#include "mbox.h"
+extern "C" {
#include "flash.h"
+}
#include "vpnor/test/tmpd.hpp"
OpenPOWER on IntegriCloud