summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2011-01-04 18:05:09 +0000
committerRichard Hughes <richard@hughsie.com>2011-01-04 18:05:09 +0000
commit17b7aef701c1dfac0376149aba64fbcdde278a32 (patch)
treeede0820c06e657b0ec57253b70f5e2019a2f99a0 /tools
parentc507b516d47b5eb8b3084efb93b71aaaa92a78c1 (diff)
linux: use the number of active DRM devices to determine the system docked status
Not ideal, but better than relying on ACPI.
Diffstat (limited to 'tools')
-rw-r--r--tools/up-tool.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/up-tool.c b/tools/up-tool.c
index 9be5588..9156010 100644
--- a/tools/up-tool.c
+++ b/tools/up-tool.c
@@ -124,6 +124,7 @@ up_client_print (UpClient *client)
gboolean on_low_battery;
gboolean lid_is_closed;
gboolean lid_is_present;
+ gboolean is_docked;
g_object_get (client,
"daemon-version", &daemon_version,
@@ -133,6 +134,7 @@ up_client_print (UpClient *client)
"on-low_battery", &on_low_battery,
"lid-is-closed", &lid_is_closed,
"lid-is-present", &lid_is_present,
+ "is-docked", &is_docked,
NULL);
g_print (" daemon-version: %s\n", daemon_version);
@@ -141,7 +143,8 @@ up_client_print (UpClient *client)
g_print (" on-battery: %s\n", on_battery ? "yes" : "no");
g_print (" on-low-battery: %s\n", on_low_battery ? "yes" : "no");
g_print (" lid-is-closed: %s\n", lid_is_closed ? "yes" : "no");
- g_print (" lid-is-present: %s\n", lid_is_present ? "yes" : "no");
+ g_print (" lid-is-present: %s\n", lid_is_present ? "yes" : "no");
+ g_print (" is-docked: %s\n", is_docked ? "yes" : "no");
g_free (daemon_version);
}