multipathd: print error message for invalid arguments
authorHannes Reinecke <hare@suse.de>
Thu, 22 Oct 2015 10:06:16 +0000 (12:06 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Fri, 29 Apr 2016 12:39:21 +0000 (14:39 +0200)
Signed-off-by: Hannes Reinecke <hare@suse.de>
multipathd/main.c

index 18b225a..59f0c68 100644 (file)
@@ -2234,7 +2234,9 @@ main (int argc, char *argv[])
                        conf->ignore_new_devs = 1;
                        break;
                default:
                        conf->ignore_new_devs = 1;
                        break;
                default:
-                       ;
+                       fprintf(stderr, "Invalid argument '-%c'\n",
+                               optopt);
+                       exit(1);
                }
        }
        if (optind < argc) {
                }
        }
        if (optind < argc) {