From e2959275b628151f64ce89ee2f5a36fa20c9778b Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Tue, 18 Aug 2020 14:12:34 -0600 Subject: [PATCH] multicall: add ability for applets to specify a manpage reference --- cmd/multicall-options.c | 3 +++ cmd/multicall.h | 1 + 2 files changed, 4 insertions(+) diff --git a/cmd/multicall-options.c b/cmd/multicall-options.c index 9037264..0c7597a 100644 --- a/cmd/multicall-options.c +++ b/cmd/multicall-options.c @@ -62,6 +62,9 @@ generic_usage(const struct if_applet *applet, int result) } } + if (applet->manpage != NULL) + fprintf(stderr, "\nFor more information: man %s\n", applet->manpage); + exit(result); } diff --git a/cmd/multicall.h b/cmd/multicall.h index 23cb836..0843580 100644 --- a/cmd/multicall.h +++ b/cmd/multicall.h @@ -43,6 +43,7 @@ struct if_applet { const char *name; const char *desc; const char *usage; + const char *manpage; int (*const main)(int argc, char *argv[]); const struct if_option_group *groups[16]; };