diff options
author | Marius Strobl <marius@FreeBSD.org> | 2011-01-05 15:28:30 +0000 |
---|---|---|
committer | Marius Strobl <marius@FreeBSD.org> | 2011-01-05 15:28:30 +0000 |
commit | a0fc3825c3b361abf38bd0d2909d6838bef865f0 (patch) | |
tree | ac9f92adbe89e0fbaf5681fe56ce1a7ed174a2b1 /sbin/ifconfig/ifmedia.c | |
parent | 8b28e7e1a390eedc7e1b19ba440d7618a52351ff (diff) | |
download | src-a0fc3825c3b361abf38bd0d2909d6838bef865f0.tar.gz src-a0fc3825c3b361abf38bd0d2909d6838bef865f0.zip |
Teach ifconfig(8) the handy shared option shortcut aliases the NetBSD
counterpart also takes, i.e. "fdx" for "full-duplex", "flow" for
"flowcontrol", "hdx" for "half-duplex" as well as "loop" and "loopback"
for "hw-loopback".
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=217013
Diffstat (limited to 'sbin/ifconfig/ifmedia.c')
-rw-r--r-- | sbin/ifconfig/ifmedia.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifmedia.c b/sbin/ifconfig/ifmedia.c index b15c4f938ab6..0fd2f2b3dee2 100644 --- a/sbin/ifconfig/ifmedia.c +++ b/sbin/ifconfig/ifmedia.c @@ -421,6 +421,9 @@ static struct ifmedia_description ifm_subtype_shared_aliases[] = static struct ifmedia_description ifm_shared_option_descriptions[] = IFM_SHARED_OPTION_DESCRIPTIONS; +static struct ifmedia_description ifm_shared_option_aliases[] = + IFM_SHARED_OPTION_ALIASES; + struct ifmedia_type_to_subtype { struct { struct ifmedia_description *desc; @@ -429,7 +432,7 @@ struct ifmedia_type_to_subtype { struct { struct ifmedia_description *desc; int alias; - } options[3]; + } options[4]; struct { struct ifmedia_description *desc; int alias; @@ -448,6 +451,7 @@ static struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = { }, { { &ifm_shared_option_descriptions[0], 0 }, + { &ifm_shared_option_aliases[0], 1 }, { &ifm_subtype_ethernet_option_descriptions[0], 0 }, { NULL, 0 }, }, @@ -465,6 +469,7 @@ static struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = { }, { { &ifm_shared_option_descriptions[0], 0 }, + { &ifm_shared_option_aliases[0], 1 }, { &ifm_subtype_tokenring_option_descriptions[0], 0 }, { NULL, 0 }, }, @@ -482,6 +487,7 @@ static struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = { }, { { &ifm_shared_option_descriptions[0], 0 }, + { &ifm_shared_option_aliases[0], 1 }, { &ifm_subtype_fddi_option_descriptions[0], 0 }, { NULL, 0 }, }, @@ -499,6 +505,7 @@ static struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = { }, { { &ifm_shared_option_descriptions[0], 0 }, + { &ifm_shared_option_aliases[0], 1 }, { &ifm_subtype_ieee80211_option_descriptions[0], 0 }, { NULL, 0 }, }, @@ -518,6 +525,7 @@ static struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = { }, { { &ifm_shared_option_descriptions[0], 0 }, + { &ifm_shared_option_aliases[0], 1 }, { &ifm_subtype_atm_option_descriptions[0], 0 }, { NULL, 0 }, }, |