multicall: add ability for applets to specify a manpage reference

This commit is contained in:
Ariadne Conill 2020-08-18 14:12:34 -06:00
parent 9fed844352
commit e2959275b6
2 changed files with 4 additions and 0 deletions

View file

@ -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);
}

View file

@ -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];
};