From 8f71d37bc5c98ee209dcaa14356546724a95c541 Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Mon, 14 Nov 2011 02:47:57 +0100 Subject: [PATCH] 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 --- sys-utils/prlimit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) { -- 2.47.3