Bug 217815

Summary: ifconfig wrap around line not indented
Product: Base System Reporter: joeb1
Component: binAssignee: freebsd-bugs mailing list <bugs>
Status: New ---    
Severity: Affects Many People    
Priority: ---    
Version: 11.0-RELEASE   
Hardware: Any   
OS: Any   

Description joeb1 2017-03-15 17:04:49 UTC
Some network devices have a long list of options and when ifconfig lists them    the line wraps around to position one instead of being indented.

An example follows.

/root >ifconfig -a
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=4019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,VLA
N_HWTSO>
	ether d0:50:99:93:75:98
	inet 7x.14x.8x.7x netmask 0xfffffc00 broadcast 255.255.255.255 
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active
vge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST
,WOL_MCAST,WOL_MAGIC>
	ether 10:00:60:21:00:93
	inet 10.0.10.2 netmask 0xff000000 broadcast 10.255.255.255 
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active

Need to change ifconfig to check print line length to see if the content exceeds the max line size, and if so take the remaining content and print it on a new indented line so it looks nice.