Date: Mon, 20 Sep 2010 15:30:08 GMT From: Alexander Best <arundel@freebsd.org> To: freebsd-geom@FreeBSD.org Subject: Re: bin/144521: [geom] geom(8) tool parsing non-subclass command broken Message-ID: <201009201530.o8KFU8Wi087478@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/144521; it has been noted by GNATS.
From: Alexander Best <arundel@freebsd.org>
To: bug-followup@freebsd.org
Cc:
Subject: Re: bin/144521: [geom] geom(8) tool parsing non-subclass command broken
Date: Mon, 20 Sep 2010 15:27:19 +0000
i just had a look at sbin/geom/core/geom.c the logic seems to be this:
1) if there's no arg or the arg is "help" or "-h" then display usage()
2) if that's not the case get the possible options which a classe defines and
add then to these options which are always printed even if the class doesn't
support them or the class doesn't exist:
usage: geom CLASS help
geom CLASS list [name ...]
geom CLASS status [-s] [name ...]
geom CLASS load [-v]
geom CLASS unload [-v]
so if i understood it correctly 2 semantic changes should happen:
1) if the class doesn exist print out something like:
geom: Unknown class: CLASS.
usage: geom <class> <command> [options]
2) if a valid class has been specified the usage output should only show
commands which are supported by the class.
cheers.
alex
--
a13x
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009201530.o8KFU8Wi087478>
