[PATCH 01/15] prlimit: show all limits if called without options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[PATCH 01/15] 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@xxxxxxxxxxxxxxxxxxx>
---
 sys-utils/prlimit.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/sys-utils/prlimit.c b/sys-utils/prlimit.c
index d3f3503..fed4f38 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) {
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux