From ru@ucb.crimea.ua  Tue Apr 14 03:26:28 1998
Received: from relay.ucb.crimea.ua (relay.ucb.crimea.ua [194.93.177.113])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA04276
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 14 Apr 1998 03:26:16 GMT
          (envelope-from ru@ucb.crimea.ua)
Received: (from ru@localhost)
	by relay.ucb.crimea.ua (8.8.8/8.8.8) id GAA09380;
	Tue, 14 Apr 1998 06:25:58 +0300 (EEST)
	(envelope-from ru)
Message-Id: <199804140325.GAA09380@relay.ucb.crimea.ua>
Date: Tue, 14 Apr 1998 06:25:58 +0300 (EEST)
From: Ruslan Ermilov <ru@ucb.crimea.ua>
Reply-To: ru@ucb.crimea.ua
To: FreeBSD-gnats-submit@freebsd.org
Subject: manpage for who(1) has inaccurate synopsis
X-Send-Pr-Version: 3.2

>Number:         6294
>Category:       bin
>Synopsis:       who(1) needs better argument parsing
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 13 20:30:00 PDT 1998
>Closed-Date:    Mon May 25 00:22:50 PDT 1998
>Last-Modified:  Mon May 25 00:27:22 PDT 1998
>Originator:     Ruslan Ermilov
>Release:        FreeBSD 2.2.6-STABLE i386
>Organization:
United Commercial Bank
>Environment:

	-stable and -current

>Description:

	Instead of

		who [am I] [file]

	it should look like

		who [am I]
		who [file]

>How-To-Repeat:


>Fix:
	
For both -current and -stable.

Index: who.1
===================================================================
RCS file: /usr/FreeBSD-CVS/src/usr.bin/who/who.1,v
retrieving revision 1.2.2.1
diff -u -r1.2.2.1 who.1
--- who.1	1997/08/27 06:19:30	1.2.2.1
+++ who.1	1998/04/14 03:15:46
@@ -41,6 +41,7 @@
 .Sh SYNOPSIS
 .Nm who
 .Op Ar am I
+.Nm who
 .Op Ar file 
 .Sh DESCRIPTION
 The

>Release-Note:
>Audit-Trail:

From: Bruce Evans <bde@zeta.org.au>
To: FreeBSD-gnats-submit@FreeBSD.ORG, ru@ucb.crimea.ua
Cc:  Subject: Re: bin/6294: manpage for who(1) has inaccurate synopsis
Date: Tue, 14 Apr 1998 13:55:52 +1000

 >>Description:
 >
 >	Instead of
 >
 >		who [am I] [file]
 >
 >	it should look like
 >
 >		who [am I]
 >		who [file]
 
 Also, the options parsing is feeble:
 
 	$ who -z
 	who: -z: No such file or directory
 	$ who am you
 	bde ...
 	$ who 1 2 3
 	usage: who [file]
 	       who am I
 
 This usage message different from (and better) than the one given by
 the fixed man page.
 
 Bruce
State-Changed-From-To: open->suspended 
State-Changed-By: phk 
State-Changed-When: Mon Apr 13 23:42:31 PDT 1998 
State-Changed-Why:  
committed a compromise change. 
-> suspended  

From: Ruslan Ermilov <ru@ucb.crimea.ua>
To: Poul-Henning Kamp <phk@FreeBSD.ORG>, freebsd-gnats-submit@FreeBSD.ORG
Cc:  Subject: Re: bin/6294: who(1) needs better argument parsing
Date: Fri, 17 Apr 1998 15:49:22 +0300

 On Mon, Apr 13, 1998 at 11:43:19PM -0700, Poul-Henning Kamp wrote:
 > Old Synopsis: manpage for who(1) has inaccurate synopsis
 > New Synopsis: who(1) needs better argument parsing
 > 
 > State-Changed-From-To: open->suspended
 > State-Changed-By: phk
 > State-Changed-When: Mon Apr 13 23:42:31 PDT 1998
 > State-Changed-Why: 
 > committed a compromise change.
 > -> suspended 
 
 Here is a patch. If you like it, please commit in in -stable too.
 
 And, please, phk, commit the patch between 1.5 and 1.6 you made
 for who.1 in -stable too!
 
 Index: who.c
 ===================================================================
 RCS file: /usr/FreeBSD-CVS/src/usr.bin/who/who.c,v
 retrieving revision 1.5
 diff -u -r1.5 who.c
 --- who.c	1997/08/26 11:14:57	1.5
 +++ who.c	1998/04/14 09:40:59
 @@ -54,6 +54,7 @@
  #include <locale.h>
  #include <pwd.h>
  #include <stdio.h>
 +#include <stdlib.h>
  #include <string.h>
  #include <time.h>
  #include <unistd.h>
 @@ -72,6 +73,9 @@
  	struct passwd *pw;
  	FILE *ufp, *file();
  	char *t;
 +
 +	if (getopt(argc, argv, "") != -1)
 +		usage();
  
  	(void) setlocale(LC_TIME, "");
 
 -----------------------------------------------
 And here is it's work:
  
 # who -z
 who: illegal option -- z
 usage: who [file]
        who am i
 # who
 dev      cuac00  Apr 14 12:33
 bill     ttyp0   Apr 14 09:08	(wks-1-254)
 ru       ttyp1   Apr 14 09:19	(wks-1-250)
 ru       ttyp2   Apr 14 08:15	(wks-1-250)
 ru       ttyp3   Apr 14 12:09	(wks-1-250)
 ru       ttyp4   Apr 14 10:07	(wks-1-250)
 # who 1
 who: 1: No such file or directory
 # who 1 2
 ru       ttyp2   Apr 14 08:15	(wks-1-250)
 # who 1 2 3
 usage: who [file]
        who am i
 
 Regards,
 -- 
 Ruslan Ermilov          System Administrator
 ru@ucb.crimea.ua        United Commercial Bank
 +380-652-247647         Simferopol, Crimea
 2426679                 ICQ Network, UIN
State-Changed-From-To: suspended->closed 
State-Changed-By: steve 
State-Changed-When: Mon May 25 00:22:50 PDT 1998 
State-Changed-Why:  
Fixed in both -stable and -current, thanks! 
>Unformatted:
