Fix the ResetBIOS value from bios-settings-mgr srv

GetStoredHash command always return 0xCE becuase fail to
get the proper resetBIOS value from ReadResetBIOSSettings function

Fix: Added proper ResetBIOS value check in ReadResetBIOSSettings
function and also corrected the seedData filename.

Tested:

GetStoredHash command is working fine.
 ipmitool  raw 0x30 0xd8  // Request
 02 18 de c8 83 d1 5d cc 58 a4 f1 af ee f0 2a 9c
 d0 12 83 45 eb f7 06 72 62 e9 dd f5 1d 78 68 13
 41 63 2c 8a fb 9f 01 17 30 6c 69 b8 1d 67 d6 6d
 13 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 75 99 3f 96 e2 e0 81 2d 4e 40 b7 ee 2a be a3
 6a 9d c9 69 6b 3a d3 6c 04 a0 0b 41 82 0c a4 b1
 48 2b 92 7a 2a 23 7f 86 5b 22 6b e7 08 31 87 b8
 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00

Signed-off-by: Suryakanth Sekar <suryakanth.sekar@linux.intel.com>
Change-Id: Ie15cfa06371b7c77901fb10b9bc61f70ae0dd0c9
diff --git a/src/biosconfigcommands.cpp b/src/biosconfigcommands.cpp
index 38b044c..e6a6b16 100644
--- a/src/biosconfigcommands.cpp
+++ b/src/biosconfigcommands.cpp
@@ -34,6 +34,7 @@
 #include <sdbusplus/message/types.hpp>
 
 #include <filesystem>
+#include <string_view>
 
 namespace ipmi
 {
@@ -185,7 +186,28 @@
             getService(*dbus, biosConfigIntf, biosConfigBaseMgrPath);
         Value variant = getDbusProperty(*dbus, service, biosConfigBaseMgrPath,
                                         biosConfigIntf, resetBIOSSettingsProp);
-        ResetFlag = static_cast<uint8_t>(std::get<std::uint8_t>(variant));
+
+        std::string_view ResetStr = std::get<std::string>(variant);
+        if (ResetStr ==
+            "xyz.openbmc_project.BIOSConfig.Manager.ResetFlag.NoAction")
+        {
+            ResetFlag = 0;
+        }
+        else if (ResetStr == "xyz.openbmc_project.BIOSConfig.Manager.ResetFlag."
+                             "FactoryDefaults")
+        {
+            ResetFlag = 1;
+        }
+        else if (ResetStr == "xyz.openbmc_project.BIOSConfig.Manager.ResetFlag."
+                             "FailSafeDefaults")
+        {
+            ResetFlag = 2;
+        }
+        else
+        {
+            return ipmi::ccUnspecifiedError;
+        }
+
         return ipmi::ccSuccess;
     }
     catch (const std::exception& e)
@@ -796,8 +818,7 @@
 
     if (OSState != "OperatingState")
     {
-        std::string HashFilePath =
-            "/var/lib/bios-settings-manager/passwordData";
+        std::string HashFilePath = "/var/lib/bios-settings-manager/seedData";
 
         std::ifstream devIdFile(HashFilePath);
         if (devIdFile.is_open())