Fix wrong accouning of zone bytes
[fio.git] / init.c
diff --git a/init.c b/init.c
index c56a3c0bb50a095588f0d09696f8e5d8e02a1005..a50362674e21902b30cd1519146e29c59a6ba48b 100644 (file)
--- a/init.c
+++ b/init.c
@@ -293,6 +293,9 @@ static int fixup_options(struct thread_data *td)
                o->time_based = 0;
        }
 
+       if (o->fill_device && !o->size)
+               o->size = ULONG_LONG_MAX;
+
        return 0;
 }
 
@@ -751,9 +754,10 @@ static int setup_thread_area(void)
        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 +799,7 @@ static int parse_cmd_line(int argc, char *argv[])
                        terse_output = 1;
                        break;
                case 'h':
-                       usage();
+                       usage(argv[0]);
                        exit(0);
                case 'c':
                        exit(fio_show_option_help(optarg));
@@ -901,6 +905,7 @@ int parse_options(int argc, char *argv[])
                        return 0;
 
                log_err("No jobs defined(s)\n");
+               usage(argv[0]);
                return 1;
        }