bin/144521: geom(1) tool parsing non-subclass command broken

Garrett Cooper gcooper at FreeBSD.org
Thu Sep 16 22:30:05 UTC 2010


The following reply was made to PR bin/144521; it has been noted by GNATS.

From: Garrett Cooper <gcooper at FreeBSD.org>
To: Bruce Cran <bruce at cran.org.uk>
Cc: bug-followup at freebsd.org
Subject: Re: bin/144521: geom(1) tool parsing non-subclass command broken
Date: Thu, 16 Sep 2010 15:23:09 -0700

 On Thu, Sep 16, 2010 at 12:47 PM, Bruce Cran <bruce at cran.org.uk> wrote:
 > It looks like you're choosing the wrong commands. For example:
 >
 >> geom label dump
 > geom: Too few arguments.
 >> geom label status
 >> geom label list
 >> geom label create
 > geom: Permission denied
 >
 > So "help" and "load" subcommands don't work, but the others seem to.
 
 It's been a while I think this is the ultimate bug I was seeing:
 
 $ geom --help
 usage: geom --help help
        geom --help list [name ...]
        geom --help status [-s] [name ...]
        geom --help load [-v]
        geom --help unload [-v]
 $ uname -a
 FreeBSD bioshock.cisco.com 9.0-CURRENT FreeBSD 9.0-CURRENT #2 r206173:
 Tue May 25 13:21:21 PDT 2010
 root at bioshock.cisco.com:/usr/obj/usr/src/sys/BIOSHOCK  amd64
 
 Note how it's not parsing the class to see whether or not it's valid,
 and is just producing non-sensical output. Ultimately geom(8) should:
 
 1. Parse out the class and determine whether or not it's valid.
 2. Provide the help specific to that class.
 
 The recursive logic is just complicated and unnecessary (IMO) more
 than anything else.
 
 <sidenote>
 Once upon a time someone said that this command (geom) was going away
 and only subclass commands were going to be available, so I'm not sure
 whether or not that particular datapoint is factored in with the issue
 I reported in this bug.
 </sidenote>
 
 Thanks,
 -Garrett


More information about the freebsd-geom mailing list