From: Ben Pfaff Date: Tue, 15 Dec 2009 21:10:16 +0000 (-0800) Subject: ovsdb-server: Improve error message when database file argument is missing. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf3a5d915f8d4d0d1a7774430db4f11f161fea70;p=openvswitch ovsdb-server: Improve error message when database file argument is missing. --- diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index d3a332e7..3bd5bc50 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -225,9 +225,11 @@ parse_options(int argc, char *argv[], char **file_namep, argc -= optind; argv += optind; - if (argc != 1) { + if (argc > 1) { ovs_fatal(0, "database file is only non-option argument; " "use --help for usage"); + } else if (argc < 1) { + ovs_fatal(0, "missing database file argument; use --help for usage"); } *file_namep = argv[0];