summaryrefslogtreecommitdiff
path: root/tools/gusb-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gusb-main.c')
-rw-r--r--tools/gusb-main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/gusb-main.c b/tools/gusb-main.c
index 8f402c1..ef8c2e1 100644
--- a/tools/gusb-main.c
+++ b/tools/gusb-main.c
@@ -437,7 +437,12 @@ main (int argc, char *argv[])
priv->context = g_option_context_new ("GUSB Console Program");
g_option_context_add_main_entries (priv->context, options, NULL);
- g_option_context_parse (priv->context, &argc, &argv, NULL);
+ if (!g_option_context_parse (priv->context, &argc, &argv, &error)) {
+ g_printerr ("Failed to parse arguments: %s\n", error->message);
+ g_error_free (error);
+ retval = 2;
+ goto out;
+ }
/* verbose? */
if (verbose) {