options: make unit_base be posval[] based
[fio.git] / options.c
index 3eb5fdc933bfd9ddc940ceab5e0ba25eb9c14b10..6cd1e92375ccf1358362cf63b6bc1f89d6359e32 100644 (file)
--- a/options.c
+++ b/options.c
@@ -1131,6 +1131,14 @@ static struct fio_option options[FIO_MAX_OPTS] = {
                .prio   = -1, /* must come after "directory" */
                .help   = "File(s) to use for the workload",
        },
+       {
+               .name   = "filename_format",
+               .type   = FIO_OPT_STR_STORE,
+               .off1   = td_var_offset(filename_format),
+               .prio   = -1, /* must come after "directory" */
+               .help   = "Override default $jobname.$jobnum.$filenum naming",
+               .def    = "$jobname.$jobnum.$filenum",
+       },
        {
                .name   = "kb_base",
                .type   = FIO_OPT_INT,
@@ -1140,6 +1148,27 @@ static struct fio_option options[FIO_MAX_OPTS] = {
                .def    = "1024",
                .help   = "How many bytes per KB for reporting (1000 or 1024)",
        },
+       {
+               .name   = "unit_base",
+               .type   = FIO_OPT_INT,
+               .off1   = td_var_offset(unit_base),
+               .prio   = 1,
+               .posval = {
+                         { .ival = "0",
+                           .oval = 0,
+                           .help = "Auto-detect",
+                         },
+                         { .ival = "8",
+                           .oval = 8,
+                           .help = "Normal (byte based)",
+                         },
+                         { .ival = "1",
+                           .oval = 1,
+                           .help = "Bit based",
+                         },
+               },
+               .help   = "Bit multiple of result summary data (8 for byte, 1 for bit)",
+       },
        {
                .name   = "lockfile",
                .type   = FIO_OPT_STR,