* [PATCH] chpst qua softlimit: fix usage message
@ 2012-09-29 4:21 Mike Pomraning
0 siblings, 0 replies; only message in thread
From: Mike Pomraning @ 2012-09-29 4:21 UTC (permalink / raw)
To: supervision
Issue: chpst sometimes displays its primary usage text when invoked
as 'softlimit', which text is inappropriate for that utility.
Demonstration:
# OK
$ ./chpst -b softlimit ./chpst
usage: softlimit [-a allbytes] [-c corebytes] ...
# oops!
$ ./chpst -b softlimit ./chpst -a INVALID
usage: softlimit [-vP012] [-u user[:group]] [-U user[:group]] ...
Patch:
diff --git a/src/chpst.c b/src/chpst.c
index f1b8ed9..2886e96 100644
--- a/src/chpst.c
+++ b/src/chpst.c
@@ -446,7 +446,7 @@ void getlarg(long *l) {
unsigned long ul;
if (str_equal(optarg, "=")) { *l =-1; return; }
- if (optarg[scan_ulong(optarg, &ul)]) usage();
+ if (optarg[scan_ulong(optarg, &ul)]) softlimit_usage();
*l =ul;
}
void softlimit(int argc, const char *const *argv) {
-Mike
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-09-29 4:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-29 4:21 [PATCH] chpst qua softlimit: fix usage message Mike Pomraning
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).