From d1286e57f932c26ecedf9958f20a4768e8112948 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 4 Dec 2020 00:50:19 -0700 Subject: [PATCH] multicall: print applet descriptions --- cmd/multicall.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cmd/multicall.c b/cmd/multicall.c index 4f94405..6067ddf 100644 --- a/cmd/multicall.c +++ b/cmd/multicall.c @@ -113,18 +113,21 @@ multicall_main(int argc, char *argv[]) void multicall_usage(int status) { - fprintf(stderr, "usage: ifupdown [options]\n"); + fprintf(stderr, + PACKAGE_NAME " " PACKAGE_VERSION "\n" + "usage: ifupdown [options]\n" + "\n" + "Built-in applets:\n"); - fprintf(stderr, "\nBuilt-in applets:\n\t"); for (size_t i = 0; i < ARRAY_SIZE(applet_table); i++) { - if (i != 0) - fprintf(stderr, ", "); + if (applet_table[i] == &ifupdown_applet) + continue; - fprintf(stderr, "%s", applet_table[i]->name); + fprintf(stderr, " %s - %s\n", applet_table[i]->name, applet_table[i]->desc); } - fprintf(stderr, "\n"); + fprintf(stderr, "\nReport bugs at <" PACKAGE_BUGREPORT ">.\n"); exit(status); }