Initialize first byte in IPMI cache file
In the IPMI cache file, the first byte of this file was always
essentially random, because it was in a structure that had this field
uninitialized. Fixing it, by arbitrarily choosing the value 0x01.
Added a new constant "mdrDirVersion" for this, and also added a similar
constant for "smbiosDirVersion" (which was being initialized, but to a
magic number directly in the code, not a constant).
Tested: Cache files now appear consistently.
Change-Id: I1f13ae973965b1a7105e2ac054ae30c52f45e2a9
Signed-off-by: Josh Lehan <krellan@google.com>
diff --git a/include/mdrv2.hpp b/include/mdrv2.hpp
index 65890ed..c2cf038 100644
--- a/include/mdrv2.hpp
+++ b/include/mdrv2.hpp
@@ -79,7 +79,7 @@
smbiosPath, smbiosInterfaceName))
{
smbiosDir.agentVersion = smbiosAgentVersion;
- smbiosDir.dirVersion = 1;
+ smbiosDir.dirVersion = smbiosDirVersion;
smbiosDir.dirEntries = 1;
directoryEntries(smbiosDir.dirEntries);
smbiosDir.status = 1;