From cf3a5d915f8d4d0d1a7774430db4f11f161fea70 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 15 Dec 2009 13:10:16 -0800 Subject: [PATCH] ovsdb-server: Improve error message when database file argument is missing. --- ovsdb/ovsdb-server.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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]; -- 2.30.2