Show fio help page when no arguments are given
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/init.c b/init.c
index c56a3c0..83957cf 100644
--- a/init.c
+++ b/init.c
@@ -751,9 +751,10 @@
return 0;
}
-static void usage(void)
+static void usage(const char *name)
{
printf("%s\n", fio_version_string);
+ printf("%s [options] [job options] <job file(s)>\n", name);
printf("\t--output\tWrite output to file\n");
printf("\t--timeout\tRuntime in seconds\n");
printf("\t--latency-log\tGenerate per-job latency logs\n");
@@ -795,7 +796,7 @@
terse_output = 1;
break;
case 'h':
- usage();
+ usage(argv[0]);
exit(0);
case 'c':
exit(fio_show_option_help(optarg));
@@ -901,6 +902,7 @@
return 0;
log_err("No jobs defined(s)\n");
+ usage(argv[0]);
return 1;
}