Bug 252644

Summary: ifconfig 'usage' does not match man page synopsis
Product: Base System Reporter: ghuckriede
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Some People CC: emaste
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Possible patch none

Description ghuckriede 2021-01-13 18:18:54 UTC
Created attachment 221537 [details]
Possible patch

'ifconfig' displayed usage is incomplete and does not match the synopsis in the man page. 

Steps to Reproduce: 
Execute 'ifconfig' with invalid options and compare with man page synopsis.

Actual Results: 
root@FreeBSD_head:/usr/src # ifconfig -Z
ifconfig: illegal option -- Z
usage: ifconfig [-f type:format] [-g groupname] [-C] [-L] interface address_family
                [address [dest_address]] [parameters]
       ifconfig interface create
       ifconfig -a [-g groupname] [-C] [-L] [-d] [-m] [-u] [-v] [address_family]
       ifconfig -l [-d] [-u] [address_family]
       ifconfig [-g groupname] [-C] [-L] [-d] [-m] [-u] [-v]
root@FreeBSD_head:/usr/src # 

Expected Results:
root@FreeBSD_head:/usr/src # ifconfig -Z
ifconfig: illegal option -- Z
usage: ifconfig [-f type:format[,type:format]] [-L] [-k] [-m] [-n] interface
                [create] address_family [address [dest_address]] [parameters]
       ifconfig interface destroy
       ifconfig -a [-L] [-d] [-g groupname] [-m] [-u] [-v] [address_family]
       ifconfig -l [-d] [-u] [address_family]
       ifconfig [-L] [-d] [-k] [-m] [-u] [-v] [-C]
       ifconfig [-g groupname]
root@FreeBSD_head:/usr/src # 
N.B.Patched ifconfig is displayed and matches the man page synopsis.

Build Date & Hardware: 
root@FreeBSD_head:/usr/src # uname -a
FreeBSD FreeBSD_head 13.0-CURRENT FreeBSD 13.0-CURRENT #5 r369005: Wed Jan 13 10:20:13 EST 2021     root@FreeBSD_head:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64

Additional Information: