summaryrefslogtreecommitdiffstats
path: root/sys-utils/prlimit.c
diff options
context:
space:
mode:
authorBernhard Voelker2011-11-14 02:47:57 +0100
committerKarel Zak2011-11-16 10:24:28 +0100
commit8f71d37bc5c98ee209dcaa14356546724a95c541 (patch)
treeb13f21bd6ff40a06a3df154f2f950e32479bc4d6 /sys-utils/prlimit.c
parentwipefs: add -t <list> option (diff)
downloadkernel-qcow2-util-linux-8f71d37bc5c98ee209dcaa14356546724a95c541.tar.gz
kernel-qcow2-util-linux-8f71d37bc5c98ee209dcaa14356546724a95c541.tar.xz
kernel-qcow2-util-linux-8f71d37bc5c98ee209dcaa14356546724a95c541.zip
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 <mail@bernhard-voelker.de>
Diffstat (limited to 'sys-utils/prlimit.c')
-rw-r--r--sys-utils/prlimit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys-utils/prlimit.c b/sys-utils/prlimit.c
index d3f3503ee..fed4f382c 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) {