]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
prlimit: show all limits if called without options
authorBernhard Voelker <mail@bernhard-voelker.de>
Mon, 14 Nov 2011 01:47:57 +0000 (02:47 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 16 Nov 2011 09:24:28 +0000 (10:24 +0100)
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 <mail@bernhard-voelker.de>
sys-utils/prlimit.c

index d3f3503ee4aad7799f716f1398e7763203b071cf..fed4f382c233a563213d25cac19252daebdccc0a 100644 (file)
@@ -581,8 +581,7 @@ int main(int argc, char **argv)
                        break;
                }
        }
-
-       if (argc == 1)
+       if (argc > optind)
                usage(stderr);
 
        if (!ncolumns) {