cfg-mod: Complain about non-option arguments, since we don't support any.
authorBen Pfaff <blp@nicira.com>
Mon, 6 Apr 2009 22:36:14 +0000 (15:36 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 6 Apr 2009 23:34:32 +0000 (16:34 -0700)
utilities/cfg-mod.c

index 67a1464bda81c7c2eb952db55826569a9e9829fe..f7d0b634c70a992dc1e7aba76cf0ccedd4477ec2 100644 (file)
@@ -154,6 +154,11 @@ int main(int argc, char *argv[])
     }
     free(short_options);
 
+    if (optind != argc) {
+        ofp_fatal(0, "non-option arguments not accepted "
+                  "(use --help for help)");
+    }
+
     if (modified) {
         cfg_write();
     }