summaryrefslogtreecommitdiff
path: root/src/pjctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pjctl.c')
-rw-r--r--src/pjctl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/pjctl.c b/src/pjctl.c
index 3084d94..91f6bb2 100644
--- a/src/pjctl.c
+++ b/src/pjctl.c
@@ -556,11 +556,12 @@ static struct pjctl_command {
};
static void
-print_commands(struct pjctl *pjctl)
+usage(struct pjctl *pjctl)
{
int i;
- g_print("Commands:\n");
+ g_print("usage: pjctl <hostname> command [args..]\n\n");
+ g_print("commands:\n");
for (i = 0; i < G_N_ELEMENTS(commands); ++i)
g_print(" %s %s\n", commands[i].name, commands[i].help);
}
@@ -581,7 +582,7 @@ main(int argc, char **argv)
g_type_init();
if (argc <= 2) {
- print_commands(&pjctl);
+ usage(&pjctl);
return 1;
}
@@ -595,7 +596,7 @@ main(int argc, char **argv)
/* Nothing got into queue? User gave invalid command. */
if (g_list_length(pjctl.queue) == 0) {
g_printerr("error: invalid command\n");
- print_commands(&pjctl);
+ usage(&pjctl);
return 1;
}