diff options
author | Guillem Jover <guillem@debian.org> | 2014-08-07 01:17:50 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2014-08-10 01:37:48 +0200 |
commit | d6838f2dca3da5a9eb8615002a1e7fef7766b81b (patch) | |
tree | 8aa412efd8514845490303ef3180b7e0f2847750 /src | |
parent | e161b733cf23716f35328afcd6f0ac23dc4f8e03 (diff) | |
download | dpkg-d6838f2dca3da5a9eb8615002a1e7fef7766b81b.tar.gz |
dpkg: Fix --add-architecture and --remove-architecture to take one argument
These commands take exactly one argument, check that and error out.
Closes: #757254
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c index 6e15f3fd3..65c36268c 100644 --- a/src/main.c +++ b/src/main.c @@ -498,8 +498,8 @@ arch_add(const char *const *argv) struct dpkg_arch *arch; const char *archname = *argv++; - if (archname == NULL) - badusage(_("--%s takes one argument"), cipaction->olong); + if (archname == NULL || *argv) + badusage(_("--%s takes exactly one argument"), cipaction->olong); dpkg_arch_load_list(); @@ -528,8 +528,8 @@ arch_remove(const char *const *argv) struct pkgiterator *iter; struct pkginfo *pkg; - if (archname == NULL) - badusage(_("--%s takes one argument"), cipaction->olong); + if (archname == NULL || *argv) + badusage(_("--%s takes exactly one argument"), cipaction->olong); modstatdb_open(msdbrw_readonly); |