Fix for non-existance of smbios file

After server reset, smbios info (file) will be created little
late in booting flow and causing error for consumers. This commit adds
smbios existence check and returns "CommandResponseNotProvided" for
consumer to handle such case.

Tested:
Verified using IPMI command
Command:  ipmitool  raw 0x3E 0x31 0x01 0x01 0x00 //read smbios data
Response:  Unable to send RAW command
(channel=0x0 netfn=0x3e lun=0x0 cmd=0x31 rsp=0xce):Command response
could not be provided.

Change-Id: I70c8ce42fc6673331dfea353ae3d0ac4980a5c3b
Signed-off-by: Prithvi A Pai <prithvi.a.pai@intel.com>
diff --git a/src/smbiosmdrv2handler.cpp b/src/smbiosmdrv2handler.cpp
index e782d7c..fa250c6 100644
--- a/src/smbiosmdrv2handler.cpp
+++ b/src/smbiosmdrv2handler.cpp
@@ -304,6 +304,13 @@
             "Error getting DirEnries");
         return ipmi::responseUnspecifiedError();
     }
+    if (std::get<uint8_t>(value) == 0)
+    {
+        phosphor::logging::log<phosphor::logging::level::ERR>(
+            "Error getting directory entries",
+            phosphor::logging::entry("VALUE=%x", std::get<uint8_t>(value)));
+        return ipmi::responseUnspecifiedError();
+    }
     if (dirIndex > std::get<uint8_t>(value))
     {
         return ipmi::responseParmOutOfRange();