multicall: add ability for applets to specify a manpage reference
This commit is contained in:
parent
9fed844352
commit
e2959275b6
2 changed files with 4 additions and 0 deletions
|
@ -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);
|
exit(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ struct if_applet {
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *desc;
|
const char *desc;
|
||||||
const char *usage;
|
const char *usage;
|
||||||
|
const char *manpage;
|
||||||
int (*const main)(int argc, char *argv[]);
|
int (*const main)(int argc, char *argv[]);
|
||||||
const struct if_option_group *groups[16];
|
const struct if_option_group *groups[16];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue