Add handling for FRU prefixes
There are some FRU eeproms in the wild that use the custom field to
represent the MAC address, but prefix the mac itself with "MAC:"
Detect this case, and expose this as a new field MAC_<Previous
fieldname>. This allows Entity-Manager to properly parse the MAC
address to fill into EthernetInterface and set the MAC address.
Tested: Boot a platform with this type of fru (P3809)
Observe that the MAC address is set correctly. Introspecting DBUS shows
the mac field was added correctly
Change-Id: I03dbeebc41c8e589d7992b91d589f40e9e11f5c5
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/test/test_fru-utils.cpp b/test/test_fru-utils.cpp
index 19aff02..9d154f6 100644
--- a/test/test_fru-utils.cpp
+++ b/test/test_fru-utils.cpp
@@ -427,6 +427,7 @@
Pair("BOARD_PRODUCT_NAME", "P3809"),
Pair("BOARD_SERIAL_NUMBER", "1583324800150"),
Pair("Common_Format_Version", "1"), Pair("PRODUCT_ASSET_TAG", ""),
+ Pair("MAC_BOARD_INFO_AM2", "3C:6D:66:14:C8:7A"),
Pair("PRODUCT_FRU_VERSION_ID", "v0.1"),
Pair("PRODUCT_LANGUAGE_CODE", "25"),
Pair("PRODUCT_MANUFACTURER", "NVIDIA"),