util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/15] prlimit: show all limits if called without options
@ 2011-11-14  1:47 Bernhard Voelker
  2011-11-16 12:34 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Bernhard Voelker @ 2011-11-14  1:47 UTC (permalink / raw)
  To: util-linux

[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@bernhard-voelker.de>
---
  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) {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-16 12:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-14  1:47 [PATCH 01/15] prlimit: show all limits if called without options Bernhard Voelker
2011-11-16 12:34 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).