From owner-freebsd-geom@FreeBSD.ORG Thu Sep 16 22:30:05 2010 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BD34106564A for ; Thu, 16 Sep 2010 22:30:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 10D668FC08 for ; Thu, 16 Sep 2010 22:30:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o8GMU4ln044272 for ; Thu, 16 Sep 2010 22:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o8GMU4gx044268; Thu, 16 Sep 2010 22:30:04 GMT (envelope-from gnats) Date: Thu, 16 Sep 2010 22:30:04 GMT Message-Id: <201009162230.o8GMU4gx044268@freefall.freebsd.org> To: freebsd-geom@FreeBSD.org From: Garrett Cooper Cc: Subject: Re: bin/144521: geom(1) tool parsing non-subclass command broken X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Garrett Cooper List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 22:30:05 -0000 The following reply was made to PR bin/144521; it has been noted by GNATS. From: Garrett Cooper To: Bruce Cran Cc: bug-followup@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 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@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. 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. Thanks, -Garrett