Date: Mon, 15 Dec 2008 01:10:53 +0000 (UTC) From: Sam Leffler <sam@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r186104 - head/sbin/ifconfig Message-ID: <200812150110.mBF1ArWe079741@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sam Date: Mon Dec 15 01:10:52 2008 New Revision: 186104 URL: http://svn.freebsd.org/changeset/base/186104 Log: fix handling of sku codes like country codes Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Mon Dec 15 01:10:08 2008 (r186103) +++ head/sbin/ifconfig/ifieee80211.c Mon Dec 15 01:10:52 2008 (r186104) @@ -1958,8 +1958,12 @@ DECL_CMD_FUNC(set80211regdomain, val, d) rd = lib80211_regdomain_findbyname(rdp, val); if (rd == NULL) { - rd = lib80211_regdomain_findbysku(rdp, atoi(val)); - if (rd == NULL) + char *eptr; + long sku = strtol(val, &eptr, 0); + + if (eptr != val) + rd = lib80211_regdomain_findbysku(rdp, sku); + if (eptr == val || rd == NULL) errx(1, "unknown regdomain %s", val); } getregdomain(s);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812150110.mBF1ArWe079741>