From owner-freebsd-geom@FreeBSD.ORG Mon Sep 20 15:30:08 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 7C721106566C for ; Mon, 20 Sep 2010 15:30:08 +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 6C2658FC1E for ; Mon, 20 Sep 2010 15:30:08 +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 o8KFU8U9087483 for ; Mon, 20 Sep 2010 15:30:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o8KFU8Wi087478; Mon, 20 Sep 2010 15:30:08 GMT (envelope-from gnats) Date: Mon, 20 Sep 2010 15:30:08 GMT Message-Id: <201009201530.o8KFU8Wi087478@freefall.freebsd.org> To: freebsd-geom@FreeBSD.org From: Alexander Best Cc: Subject: Re: bin/144521: [geom] geom(8) tool parsing non-subclass command broken X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexander Best List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2010 15:30:08 -0000 The following reply was made to PR bin/144521; it has been noted by GNATS. From: Alexander Best 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 [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