Commit 56cb5067 authored by Christian Kellner's avatar Christian Kellner

manger: log force power state changes

Emit a log message when the force power state changes, which also
includes changes to the support state, i.e. if support or not.
parent d76fb9d2
Pipeline #13633 passed with stage
in 4 minutes and 12 seconds
...@@ -1775,6 +1775,12 @@ handle_power_state_changed (GObject *gobject, ...@@ -1775,6 +1775,12 @@ handle_power_state_changed (GObject *gobject,
gpointer user_data) gpointer user_data)
{ {
BoltManager *mgr = BOLT_MANAGER (user_data); BoltManager *mgr = BOLT_MANAGER (user_data);
gboolean supported = bolt_power_can_force (mgr->power);
BoltPowerState state = bolt_power_get_state (mgr->power);
bolt_info (LOG_TOPIC ("power"), "state changed: %s/%s",
(supported ? "supported" : "unsupported"),
bolt_power_state_to_string (state));
g_object_notify_by_pspec (G_OBJECT (mgr), props[PROP_POWERSTATE]); g_object_notify_by_pspec (G_OBJECT (mgr), props[PROP_POWERSTATE]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment