Update OSState when system is off

When power state is changed to Off, POST_COMPLETE GPIO event
is not working in some platforms. This is causing the OSState
set to Standby even though system is OFF. Due to this behavior
false threshold events are logged for SSB Temp sensor.

Check HostState for Off and updating 'OperatingSystemState'
to 'Inactive'.

Tested:
Performed power actions like on, off, reset, soft etc..
and observed no false threshold events.

Change-Id: I237974e0ae577a904424504b23387fc34751ddaa
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
diff --git a/power-control-x86/src/power_control.cpp b/power-control-x86/src/power_control.cpp
index 6f77d52..b8497e0 100644
--- a/power-control-x86/src/power_control.cpp
+++ b/power-control-x86/src/power_control.cpp
@@ -1305,6 +1305,14 @@
             else
             {
                 pohCounterTimer.cancel();
+                // POST_COMPLETE GPIO event is not working in some platforms
+                // when power state is changed to OFF. This resulted in
+                // 'OperatingSystemState' to stay at 'Standby', even though
+                // system is OFF. Set 'OperatingSystemState' to 'Inactive'
+                // if HostState is trurned to OFF.
+                osIface->set_property("OperatingSystemState",
+                                      std::string("Inactive"));
+
                 // Set the restart cause set for this restart
                 setRestartCause();
                 sd_journal_send("MESSAGE=Host system DC power is off",