bin/144521: [geom] geom(8) tool parsing non-subclass command broken

Alexander Best arundel at freebsd.org
Mon Sep 20 15:30:08 UTC 2010


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

From: Alexander Best <arundel at freebsd.org>
To: bug-followup at 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


More information about the freebsd-geom mailing list