diff options
author | 2014-11-14 15:09:29 +0000 | |
---|---|---|
committer | 2014-11-14 15:09:29 +0000 | |
commit | b6ac1fec119b417d9bac2e6b39337e2282c9ce73 (patch) | |
tree | 40c75a07a0ad2e5dfd7ce6c252bb229619d3c185 | |
parent | enable trunk. (diff) | |
download | wireguard-openbsd-b6ac1fec119b417d9bac2e6b39337e2282c9ce73.tar.xz wireguard-openbsd-b6ac1fec119b417d9bac2e6b39337e2282c9ce73.zip |
sort names for -C. ok reyk
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 3dac8b78d63..74c463aac3a 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.288 2014/11/14 15:03:11 henning Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.289 2014/11/14 15:09:29 tedu Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -1083,6 +1083,9 @@ list_cloners(void) if (ifcr.ifcr_count > ifcr.ifcr_total) ifcr.ifcr_count = ifcr.ifcr_total; + qsort(buf, ifcr.ifcr_count, IFNAMSIZ, + (int(*)(const void *, const void *))strcmp); + for (cp = buf, idx = 0; idx < ifcr.ifcr_count; idx++, cp += IFNAMSIZ) { if (idx > 0) putchar(' '); |