summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2013-10-17 00:46:01 +0200
committerBastien Nocera <hadess@hadess.net>2013-10-17 00:46:01 +0200
commitc00eda8ca0c2d8dc772b8cc8b4bdc93ab353dc29 (patch)
tree1b8aeefcc93edcc02d85e2087eedc99f73f7a47b /tools
parenta76eaeddb904e23ad7f03b37520d064b35c57b3b (diff)
downloadupower-c00eda8ca0c2d8dc772b8cc8b4bdc93ab353dc29.tar.gz
tools: Print the display device when using -d
Diffstat (limited to 'tools')
-rw-r--r--tools/up-tool.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/up-tool.c b/tools/up-tool.c
index e9e6ab4..c77d627 100644
--- a/tools/up-tool.c
+++ b/tools/up-tool.c
@@ -320,6 +320,16 @@ main (int argc, char **argv)
}
}
g_ptr_array_unref (devices);
+ device = up_client_get_display_device (client);
+ if (opt_enumerate) {
+ g_print ("%s\n", up_device_get_object_path (device));
+ } else {
+ g_print ("Device: %s\n", up_device_get_object_path (device));
+ text = up_device_to_text (device);
+ g_print ("%s\n", text);
+ g_free (text);
+ }
+ g_object_unref (device);
if (opt_dump) {
g_print ("Daemon:\n");
up_client_print (client);