diff options
author | Richard Hughes <richard@hughsie.com> | 2010-03-26 11:15:45 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2010-03-26 11:29:38 +0000 |
commit | bcc0c2ced07a778a41a06a0e52be37b1bbbba551 (patch) | |
tree | fc3e7b768ff73a2290ec621b896b2a131f6a6360 /tools | |
parent | 42ecfd7bdca7788e96e790eb86cbf755cbcf9a9f (diff) | |
download | upower-bcc0c2ced07a778a41a06a0e52be37b1bbbba551.tar.gz |
Ensure we enumerate devices before we start monitoring them
Diffstat (limited to 'tools')
-rw-r--r-- | tools/up-tool.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/up-tool.c b/tools/up-tool.c index a691744..d698c7c 100644 --- a/tools/up-tool.c +++ b/tools/up-tool.c @@ -331,6 +331,11 @@ main (int argc, char **argv) } if (opt_monitor || opt_monitor_detail) { + ret = up_client_enumerate_devices_sync (client, NULL, &error); + if (!ret) { + egg_warning ("failed to enumerate: %s", error->message); + goto out; + } if (!up_tool_do_monitor (client)) goto out; retval = EXIT_SUCCESS; |