On Mon, 2009-10-19 at 10:41 -0400, James Carlson wrote: > Sebastien Roy wrote: > > On Tue, 2009-10-20 at 01:16 +1100, Darren Reed wrote: > >> oh... the "usage" output disagrees with the man page... > >> silly me for not checking the man page. > > > > That seems like a bug in the create-bridge synopsis. I believe -R was > > taken out of all of the subcommand synopses in the usage output because > > is caused too much clutter and was redundant. It looks like one was > > re-introduced with create-bridge. > > *sigh* > > I think the fact that someone felt the need to make the synopsis just > reflect an arbitrary subset of the actual options supported reflects a > problem in the way the synopsis is generated. > > In other words, I don't think it's wrong for "create-bridge" to have > "-R" listed among its supported options.
No, but it's wrong to have some subcommands list all supported options while other list a subset. It's inconsistent. That leads us to: > What's wrong is that if you > type a bad subcommand (or none at all), dladm spews away at you, > producing 50+ lines of really ugly output on stderr. That's absurd. > > A bad subcommand should just cause a list of valid subcommands -- > *without* options. Seems like a good idea. It should be fairly trivial to implement these semantics. > Only a valid subcommand with bad options (or with > the special "-h" or "-?" options) should cause the options for that > subcommand to be printed. That part works: strat:~$ dladm create-bridge -? dladm: unrecognized option '-?' usage: create-bridge [-R <root-dir>] [-P <protect>] [-p <priority>] [-m <max-age>] [-h <hello-time>] [-d <forward-delay>] [-f <force-protocol>] [-l <link>]... <bridge> -Seb _______________________________________________ networking-discuss mailing list networking-discuss@opensolaris.org