Index: ifmedia.c =================================================================== --- ifmedia.c (revision 214250) +++ ifmedia.c (working copy) @@ -757,6 +757,7 @@ print_media_word_ifconfig(int ifmw) { struct ifmedia_description *desc; struct ifmedia_type_to_subtype *ttos; + const char *opt_sep; int i; /* Find the top-level interface type. */ @@ -786,13 +787,15 @@ print_media_word_ifconfig(int ifmw) printf(" mode %s", desc->ifmt_string); /* Find options. */ + opt_sep = " mediaopt "; for (i = 0; ttos->options[i].desc != NULL; i++) { if (ttos->options[i].alias) continue; for (desc = ttos->options[i].desc; desc->ifmt_string != NULL; desc++) { if (ifmw & desc->ifmt_word) { - printf(" mediaopt %s", desc->ifmt_string); + printf("%s%s", opt_sep, desc->ifmt_string); + opt_sep = ","; } } }