summaryrefslogtreecommitdiff
path: root/src/nice.c
diff options
context:
space:
mode:
authorBernhard Voelker <mail@bernhard-voelker.de>2013-01-23 01:03:38 +0100
committerBernhard Voelker <mail@bernhard-voelker.de>2013-01-23 01:03:38 +0100
commit4eaadb47430f21aee83eb920378be01945845a9a (patch)
treef826d304254dfec4e68bb9b3fa303ba228aba010 /src/nice.c
parentf8afbb424c050578617bc9ddf4ccf69ed2bdb953 (diff)
downloadcoreutils-4eaadb47430f21aee83eb920378be01945845a9a.tar.xz
maint: define usage note about mandatory args centrally
Each program with at least one long option which is marked as 'required_argument' and which has also a short option for that option, should print a note about mandatory arguments. Define that well-known note centrally and use it rather than literal printf/fputs, and add it where it was missing. * src/system.h (emit_mandatory_arg_note): Add new function. * src/cp.c (usage): Use it rather than literal printf/fputs. * src/csplit.c, src/cut.c, src/date.c, src/df.c, src/du.c: * src/expand.c, src/fmt.c, src/fold.c, src/head.c, src/install.c: * src/kill.c, src/ln.c, src/ls.c, src/mkdir.c, src/mkfifo.c: * src/mknod.c, src/mv.c, src/nl.c, src/od.c, src/paste.c: * src/pr.c, src/ptx.c, src/shred.c, src/shuf.c, src/sort.c: * src/split.c, src/stdbuf.c, src/tac.c, src/tail.c, src/timeout.c: * src/touch.c, src/truncate.c, src/unexpand.c, src/uniq.c: Likewise. * src/base64.c (usage): Add call of the above new function because at least one long option has a required argument. * src/basename.c, src/chcon.c, src/date.c, src/env.c: * src/nice.c, src/runcon.c, src/seq.c, src/stat.c, src/stty.c: Likewise.
Diffstat (limited to 'src/nice.c')
-rw-r--r--src/nice.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nice.c b/src/nice.c
index ce2b6e77a..04fd3bf6c 100644
--- a/src/nice.c
+++ b/src/nice.c
@@ -74,10 +74,14 @@ usage (int status)
Run COMMAND with an adjusted niceness, which affects process scheduling.\n\
With no COMMAND, print the current niceness. Niceness values range from\n\
%d (most favorable to the process) to %d (least favorable to the process).\n\
-\n\
- -n, --adjustment=N add integer N to the niceness (default 10)\n\
"),
- NZERO, NZERO - 1);
+
+ emit_mandatory_arg_note ();
+
+ fputs (_("\
+ -n, --adjustment=N add integer N to the niceness (default 10)\n\
+"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);