Fix undefined reference error
If the yaml file doesn't contain one of BMC/ETHERNET/ETHERNET1
description, build fails with undefined reference error.
For instance, missed ETHERNET1:
write.cpp:54: undefined reference to
`void openpower::vpd::inventory::writeFru<(openpower::vpd::Fru)2>
The patch adds default implementation for function writeFru().
Resolves
https://github.com/openbmc/openpower-vpd-parser/issues/1
Signed-off-by: Artem Senichev <a.senichev@yadro.com>
Change-Id: Ibf6c649ca504c2c0e9e3a0d8fefd54375777193d
diff --git a/writefru.mako.hpp b/writefru.mako.hpp
index 786edbd..f7f06c5 100755
--- a/writefru.mako.hpp
+++ b/writefru.mako.hpp
@@ -28,7 +28,9 @@
* @param [in] path - FRU object path
*/
template<Fru F>
-void writeFru(const Store& vpdStore, const std::string& path);
+void writeFru(const Store& vpdStore, const std::string& path) {
+ throw std::runtime_error("Not implemented");
+}
% for key in fruDict.iterkeys():
<%