]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
greybus: loopback_test: Fix -z argument bug
authorRyan Lim <limryan@google.com>
Wed, 20 Jul 2016 15:14:03 +0000 (08:14 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 20 Jul 2016 18:23:03 +0000 (11:23 -0700)
The -z argument was missing the break statement needed in the switch
block and was not in the getopt list.

Signed-off-by: Ryan Lim <limryan@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/tools/loopback_test.c

index ec448920b8e9a12e63d79d64ddf41e72f27e274b..412e6dca0d0801551833771732c46c56370c823c 100644 (file)
@@ -901,7 +901,7 @@ int main(int argc, char *argv[])
        memset(&t, 0, sizeof(t));
 
        while ((o = getopt(argc, argv,
-                          "t:s:i:S:D:m:v::d::r::p::a::l::x::o:c:w:O:")) != -1) {
+                          "t:s:i:S:D:m:v::d::r::p::a::l::x::o:O:c:w:z::")) != -1) {
                switch (o) {
                case 't':
                        snprintf(t.test_name, MAX_STR_LEN, "%s", optarg);
@@ -956,6 +956,7 @@ int main(int argc, char *argv[])
                        break;
                case 'z':
                        t.file_output = 1;
+                       break;
                default:
                        usage();
                        return -EINVAL;