blktrace: accept -v (lower case) for version info as well
authorJens Axboe <jens.axboe@oracle.com>
Thu, 16 Oct 2008 06:05:53 +0000 (08:05 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 16 Oct 2008 06:05:53 +0000 (08:05 +0200)
Christof Schmitt <christof.schmitt@de.ibm.com> points out that the
documentation uses -v but blktrace supports only -V, so change
blktrace to accept both cases.

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

index 4d458acc8e26065e31eaabaf9a47051a968e0760..68a7c700b0ab9d44563f1a19eb4c19c634c5bb66 100644 (file)
@@ -60,7 +60,7 @@ static char blktrace_version[] = "0.99.3";
 
 #define DEBUGFS_TYPE   0x64626720
 
-#define S_OPTS "d:a:A:r:o:kw:Vb:n:D:lh:p:sI:"
+#define S_OPTS "d:a:A:r:o:kw:vVb:n:D:lh:p:sI:"
 static struct option l_opts[] = {
        {
                .name = "dev",
@@ -110,6 +110,12 @@ static struct option l_opts[] = {
                .flag = NULL,
                .val = 'w'
        },
+       {
+               .name = "version",
+               .has_arg = no_argument,
+               .flag = NULL,
+               .val = 'v'
+       },
        {
                .name = "version",
                .has_arg = no_argument,
@@ -1853,6 +1859,7 @@ int main(int argc, char *argv[])
                        }
                        break;
                case 'V':
+               case 'v':
                        printf("%s version %s\n", argv[0], blktrace_version);
                        return 0;
                case 'b':