Fix for DirectoryEntries property update

IPMI command "SmmdrGetDirInfo" is giving as unspecified error even
thought smbios2 file exist in BMC under /var/lib/smbios.

After BMC FW full flash, initially directoryEntries method called to
check smbios2 file in BMC before POST BIOS. So "DirectoryEntries"
property value set to 0 as file is not present. But after POST BIOS same
property is not getting updated even file is created.

So "directoryEntries" method called again after POST BIOS to update
actual value in directoryEntries property.

Signed-off-by: Jitendra Tripathy <jitendra.kumarx.tripathy@intel.com>
Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: Iafe4568e7ba0e2f2e2484d0dbf6a80d70ff15a15
diff --git a/src/mdrv2.cpp b/src/mdrv2.cpp
index 87b197a..25ef98a 100644
--- a/src/mdrv2.cpp
+++ b/src/mdrv2.cpp
@@ -826,6 +826,12 @@
         return false;
     }
 
+    if (0 == static_cast<uint8_t>(sdbusplus::server::xyz::openbmc_project::
+                                      smbios::MDRV2::directoryEntries()))
+    {
+        directoryEntries(smbiosDir.dirEntries);
+    }
+
     systemInfoUpdate();
     smbiosDir.dir[smbiosDirIndex].common.dataVersion = mdr2SMBIOS.dirVer;
     smbiosDir.dir[smbiosDirIndex].common.timestamp = mdr2SMBIOS.timestamp;