Actually fully emulate NetBSD and print the media instance number
only for non-zero instances so the typical output for IFM_IEEE80211 type media doesn't overflow 80 columns. Requested by: sam
This commit is contained in:
parent
50c317ac7c
commit
98b0eedaf5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166169
@ -739,7 +739,7 @@ print_media_word(int ifmw, int print_toptype)
|
||||
}
|
||||
printf("%s", seen_option ? ">" : "");
|
||||
|
||||
if (print_toptype)
|
||||
if (print_toptype && IFM_INST(ifmw) != 0)
|
||||
printf(" instance %d", IFM_INST(ifmw));
|
||||
}
|
||||
|
||||
@ -788,7 +788,8 @@ print_media_word_ifconfig(int ifmw)
|
||||
}
|
||||
}
|
||||
|
||||
printf(" instance %d", IFM_INST(ifmw));
|
||||
if (IFM_INST(ifmw) != 0)
|
||||
printf(" instance %d", IFM_INST(ifmw));
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user