Put longest options first
authorJens Axboe <jens.axboe@oracle.com>
Mon, 19 Mar 2007 09:51:49 +0000 (10:51 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 19 Mar 2007 09:51:49 +0000 (10:51 +0100)
We need to have things like shmhuge before shm, otherwise the parser
will match shm. The parser needs to be fixed, this is just a quick fix.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
options.c

index e7356f65206ffbd0fd8cb491703b2c748b698c9f..e5ee4cf4d8dff1267367d447b0a3d12638645600 100644 (file)
--- a/options.c
+++ b/options.c
@@ -465,26 +465,26 @@ static struct fio_option options[] = {
                            .oval = MEM_MALLOC,
                            .help = "Use malloc(3) for IO buffers",
                          },
                            .oval = MEM_MALLOC,
                            .help = "Use malloc(3) for IO buffers",
                          },
-                         { .ival = "shm",
-                           .oval = MEM_SHM,
-                           .help = "Use shared memory segments for IO buffers",
-                         },
 #ifdef FIO_HAVE_HUGETLB
                          { .ival = "shmhuge",
                            .oval = MEM_SHMHUGE,
                            .help = "Like shm, but use huge pages",
                          },
 #ifdef FIO_HAVE_HUGETLB
                          { .ival = "shmhuge",
                            .oval = MEM_SHMHUGE,
                            .help = "Like shm, but use huge pages",
                          },
-#endif
-                         { .ival = "mmap",
-                           .oval = MEM_MMAP,
-                           .help = "Use mmap(2) (file or anon) for IO buffers",
+                         { .ival = "shm",
+                           .oval = MEM_SHM,
+                           .help = "Use shared memory segments for IO buffers",
                          },
                          },
+#endif
 #ifdef FIO_HAVE_HUGETLB
                          { .ival = "mmaphuge",
                            .oval = MEM_MMAPHUGE,
                            .help = "Like mmap, but use huge pages",
                          },
 #endif
 #ifdef FIO_HAVE_HUGETLB
                          { .ival = "mmaphuge",
                            .oval = MEM_MMAPHUGE,
                            .help = "Like mmap, but use huge pages",
                          },
 #endif
+                         { .ival = "mmap",
+                           .oval = MEM_MMAP,
+                           .help = "Use mmap(2) (file or anon) for IO buffers",
+                         },
                  },
        },
        {
                  },
        },
        {