test-record: Check parameter count and print out help

If no launch pipeline was supplied, print out some help
This commit is contained in:
Jan Schmidt 2015-08-17 02:36:31 +10:00
parent 27736d406e
commit 2a41502cde

View file

@ -51,6 +51,11 @@ main (int argc, char *argv[])
g_printerr ("Error parsing options: %s\n", error->message);
return -1;
}
if (argc < 2) {
g_print ("%s\n", g_option_context_get_help (optctx, TRUE, NULL));
return 1;
}
g_option_context_free (optctx);
loop = g_main_loop_new (NULL, FALSE);