summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/boilerplate.c3
-rw-r--r--include/c.h1
-rw-r--r--sys-utils/hwclock.c3
3 files changed, 5 insertions, 2 deletions
diff --git a/Documentation/boilerplate.c b/Documentation/boilerplate.c
index 7da9374d4..057893bfb 100644
--- a/Documentation/boilerplate.c
+++ b/Documentation/boilerplate.c
@@ -33,6 +33,9 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
{
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options] file...\n"), program_invocation_short_name);
+ fputs(USAGE_FUNCTIONS, out);
+ fputs(_(" -s, --do-something some specific task\n"), out);
+ fputs(_(" -o, --do-other some different task\n"), out);
fputs(USAGE_OPTIONS, out);
fputs(_(" -n, --no-argument option does not use argument\n"), out);
fputs(_(" --optional[=<arg>] option argument is optional\n"), out);
diff --git a/include/c.h b/include/c.h
index a5162b964..b9369c1a8 100644
--- a/include/c.h
+++ b/include/c.h
@@ -317,6 +317,7 @@ static inline int xusleep(useconds_t usec)
*/
#define USAGE_HEADER _("\nUsage:\n")
#define USAGE_OPTIONS _("\nOptions:\n")
+#define USAGE_FUNCTIONS _("\nFunctions:\n")
#define USAGE_SEPARATOR "\n"
#define USAGE_HELP _(" -h, --help display this help and exit\n")
#define USAGE_VERSION _(" -V, --version output version information and exit\n")
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index 28655b0b9..9d6bb11c0 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -1208,8 +1208,7 @@ usage(const struct hwclock_control *ctl, FILE *out)
fputs(USAGE_SEPARATOR, out);
fputs(_(" Query or set the hardware clock\n"), out);
- fputs(USAGE_SEPARATOR, out);
- fputs(_("Functions:\n"), out);
+ fputs(USAGE_FUNCTIONS, out);
fputs(_(" -r, --show read hardware clock and print result\n"
" --get read hardware clock and print drift corrected result\n"
" --set set the RTC to the time given with --date\n"), out);