diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2017-06-01 19:00:43 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-06-02 15:13:42 +0000 |
commit | aeb726df2fb7e0a3510242337c79994592ed1523 (patch) | |
tree | 2229e8343191c2c1d80159198b5d1105e83fd3cf /frup.hpp | |
parent | 5098b03916fd7a90605b6e3774ee536ef9108a94 (diff) | |
download | ipmi-fru-parser-aeb726df2fb7e0a3510242337c79994592ed1523.tar.gz ipmi-fru-parser-aeb726df2fb7e0a3510242337c79994592ed1523.zip |
fru_gen: reduce map in generated data
Eliminate one level of the generated "frus" map by creating
a structure for the lowest-level member.
This should reduce the impact of a gcc bug that consumes
excessive memory when compiling the generated map. Also
removed the runtime calculation of the 'delimiter' character
and instead generated it in the fru_gen python script.
Resolves openbmc/openbmc#1441.
Resolves openbmc/openbmc#1166.
Change-Id: Iafe049d034354d58b68d357b4f49fd5e21b2c8c7
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'frup.hpp')
-rw-r--r-- | frup.hpp | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -75,12 +75,15 @@ enum openbmc_vpd_key_id using IPMIFruInfo = std::array<std::pair<std::string,std::string>, OPENBMC_VPD_KEY_MAX>; -using IPMIFruMetadata = std::string; -using IPMIFruMetadataValue = std::string; -using IPMIFruMap = std::map<IPMIFruMetadata,IPMIFruMetadataValue>; +struct IPMIFruData +{ + std::string section; + std::string property; + std::string delimiter; +}; using DbusProperty = std::string; -using DbusPropertyMap = std::map<DbusProperty,IPMIFruMap>; +using DbusPropertyMap = std::map<DbusProperty,IPMIFruData>; using DbusInterface = std::string; using DbusInterfaceMap = std::map<DbusInterface,DbusPropertyMap>; |