mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 10:19:26 +00:00
Detect if class name is '-h' or 'help' and if it is, show general help
message, i.e.: geom: usage: geom <class> <command> [options] PR: bin/71537 Submitted by: bugghy <bugghy@phenix.rootshell.be> MFC after: 5 days
This commit is contained in:
parent
dffc5d9a8e
commit
687b001501
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=139377
@ -523,6 +523,12 @@ get_class(int *argc, char ***argv)
|
||||
if (strcmp(comm, "geom") == 0) {
|
||||
if (*argc < 2)
|
||||
geom_usage();
|
||||
else if (*argc == 2) {
|
||||
if (strcmp((*argv)[1], "-h") == 0 ||
|
||||
strcmp((*argv)[1], "help") == 0) {
|
||||
geom_usage();
|
||||
}
|
||||
}
|
||||
strlcatf(comm, sizeof(comm), " %s", (*argv)[1]);
|
||||
class_name = (*argv)[1];
|
||||
*argc -= 2;
|
||||
|
Loading…
Reference in New Issue
Block a user