From bugghy@phenix.rootshell.be  Thu Sep  9 17:37:42 2004
Return-Path: <bugghy@phenix.rootshell.be>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C705816A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  9 Sep 2004 17:37:42 +0000 (GMT)
Received: from phenix.rootshell.be (phenix.rootshell.be [217.22.55.50])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 44F8343D54
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  9 Sep 2004 17:37:42 +0000 (GMT)
	(envelope-from bugghy@phenix.rootshell.be)
Received: from phenix.rootshell.be (phenix [127.0.0.1])
	by phenix.rootshell.be (8.12.8/8.12.8) with ESMTP id i89HbeH7022117;
	Thu, 9 Sep 2004 19:37:40 +0200
Received: from localhost (bugghy@localhost)
	by phenix.rootshell.be (8.12.8/8.12.8/Submit) with ESMTP id i89Hbcpn005437;
	Thu, 9 Sep 2004 19:37:38 +0200
Message-Id: <Pine.LNX.4.61.0409091740580.18021@phenix.rootshell.be>
Date: Thu, 9 Sep 2004 19:37:38 +0200 (CEST)
From: bugghy <bugghy@phenix.rootshell.be>
To: FreeBSD-gnats-submit@freebsd.org
Cc: bugghy@safe-mail.net
Subject: geom syntax error/misbehaviour

>Number:         71537
>Category:       bin
>Synopsis:       [geom] geom syntax error/misbehaviour
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pjd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 09 17:40:28 GMT 2004
>Closed-Date:    Tue Dec 28 17:09:23 GMT 2004
>Last-Modified:  Tue Dec 28 17:09:23 GMT 2004
>Originator:     bugghy
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD illusion.com 6.0-CURRENT FreeBSD 6.0-CURRENT #13: Thu Sep 9 14:58:31 UTC 2004 root@illusion.com:/usr/obj/usr/src/sys/BUGNERIC i386
>Description:
         geom has a weird help message system when ran with 1-2 args
 	I know the syntax used in the examples is wrong but there is no error message explaining that.
>How-To-Repeat:
# geom list
usage: geom list help
# geom list help
usage: geom list help
# geom help
usage: geom help help
#geom badoption
usage: geom badoption help
>Fix:
         Needs a patch here:

# cat -n /usr/src/sbin/geom/core/geom.c | grep -B 1 -A 2 strcmp\(comm
    509          snprintf(comm, sizeof(comm), "%s", basename((*argv)[0]));
    510          if (strcmp(comm, "geom") == 0) {
?  511                  if (*argc < 2)
    512                          geom_usage();
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->phk 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Oct 8 05:46:54 GMT 2004 
Responsible-Changed-Why:  
Perhaps phk can comment on this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71537 
Responsible-Changed-From-To: phk->pjd 
Responsible-Changed-By: pjd 
Responsible-Changed-When: Tue Dec 28 16:45:32 GMT 2004 
Responsible-Changed-Why:  
geom(8) utility is mine, I'll look into this PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71537 
State-Changed-From-To: open->closed 
State-Changed-By: pjd 
State-Changed-When: Tue Dec 28 16:53:20 GMT 2004 
State-Changed-Why:  
As you probably know, geom(8) can operate on any GEOM class, that's 
why it assumes that first argument is a class name. 
I improved things a bit by detecting if first argument is '-h' or 'help' - 
in that case one will see general help message: 

geom: usage: geom <class> <command> [options] 

Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71537 
>Unformatted:
