From: Bernhard Voelker Date: Mon, 14 Nov 2011 01:47:57 +0000 (+0100) Subject: prlimit: show all limits if called without options X-Git-Tag: v2.21-rc1~180 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f71d37bc5c98ee209dcaa14356546724a95c541;p=thirdparty%2Futil-linux.git prlimit: show all limits if called without options Fix option parsing: prlimit ran into usage() if called without arguments which should only be done for surplus arguments. Instead, it should display all limits. Signed-off-by: Bernhard Voelker --- diff --git a/sys-utils/prlimit.c b/sys-utils/prlimit.c index d3f3503ee4..fed4f382c2 100644 --- a/sys-utils/prlimit.c +++ b/sys-utils/prlimit.c @@ -581,8 +581,7 @@ int main(int argc, char **argv) break; } } - - if (argc == 1) + if (argc > optind) usage(stderr); if (!ncolumns) {