bootstrap.conf | 1 +
lib/.gitignore | 2 ++
rest.c | 6 ++++++
3 files changed, 9 insertions(+)
New commits:
commit 0a1a0fc83ce20350cb76452b9f520260011e5e20
Author: Jim Meyering <meyering(a)redhat.com>
Date: Thu Mar 3 20:11:56 2011 +0100
diagnose excess arguments
Before, adding a stray "localhost:9001" without a preceding -d
would be silently accepted, yet that last argument would be
fatally ignored. Now, iwhd diagnoses this.
* rest.c: Include "quote.h"
(main): Diagnose excess arguments.
* bootstrap.conf (gnulib_modules): Add quote.
diff --git a/bootstrap.conf b/bootstrap.conf
index cf1da8b..2e4cf7f 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -40,6 +40,7 @@ manywarnings
mkstemp
pipe-posix
progname
+quote
quotearg
realloc-gnu
ssize_t
diff --git a/lib/.gitignore b/lib/.gitignore
index af6d24d..bf5c36c 100644
--- a/lib/.gitignore
+++ b/lib/.gitignore
@@ -58,6 +58,8 @@
/pipe.c
/progname.c
/progname.h
+/quote.c
+/quote.h
/quotearg.c
/quotearg.h
/realloc.c
diff --git a/rest.c b/rest.c
index 3192915..e89e140 100644
--- a/rest.c
+++ b/rest.c
@@ -42,6 +42,7 @@
#include "meta.h"
#include "backend.h"
#include "setup.h"
+#include "quote.h"
#include "replica.h"
#include "template.h"
#include "mpipe.h"
@@ -2249,6 +2250,11 @@ main (int argc, char **argv)
}
args_done:
+ if (optind < argc) {
+ error (0, 0, _("extra operand %s"), quote (argv[optind]));
+ usage (EXIT_FAILURE);
+ }
+
if (!db_port) {
db_port = autostart ? AUTO_MONGOD_PORT : 27017;
}
Show replies by date