Small change to power state initial sequence
When HostPowerState is constructed with a callback, if it reads true
from HostState (different from the init value of _powerState), the
callback will be called. This is not a power state change at all, so we
shouldn't call the callback.
Tested with monitor-use-host-state enabled for phosphor-fan-monitor
service.
When HostState is On, restart phosphor-fan-monitor service.
Result: the service won't throw or turn host off.
Signed-off-by: Chau Ly <chaul@amperecomputing.com>
Change-Id: Ie616a9631a129401a3cdc000612a8e694d02ef7a
1 file changed