summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2010-03-26 11:15:45 +0000
committerRichard Hughes <richard@hughsie.com>2010-03-26 11:29:38 +0000
commitbcc0c2ced07a778a41a06a0e52be37b1bbbba551 (patch)
treefc3e7b768ff73a2290ec621b896b2a131f6a6360 /tools
parent42ecfd7bdca7788e96e790eb86cbf755cbcf9a9f (diff)
Ensure we enumerate devices before we start monitoring them
Diffstat (limited to 'tools')
-rw-r--r--tools/up-tool.c5
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;