Bug 26689

Summary: logname returns error when passing opts args.
Product: Base System Reporter: reel <reel>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description reel 2001-04-19 02:20:00 UTC
logname is a utility that prints the username on the standard output.
when doing: 'logname meuh', it returns my login name, when doing
'logname reel', it returns my login name, when I do 'logname -e', it
returns an error. As logname will always return the login whatever
the argument passed is, it still wants to know if we passed some
options to it. It doesn't have any options. Which means that it should
not normally call getopt() to see if there is options, as the next
switch only brings it to usage().

Fix: Here is a patch:
How-To-Repeat: Type: logname -e (or any other options...)
Note: logname --e will not give any errors.
Comment 1 Poul-Henning Kamp freebsd_committer freebsd_triage 2001-06-05 22:04:47 UTC
State Changed
From-To: open->closed

fixed, thanks!