From owner-svn-src-all@FreeBSD.ORG Mon Dec 15 01:10:53 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B3411065672; Mon, 15 Dec 2008 01:10:53 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 287BE8FC16; Mon, 15 Dec 2008 01:10:53 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBF1ArmL079742; Mon, 15 Dec 2008 01:10:53 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBF1ArWe079741; Mon, 15 Dec 2008 01:10:53 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812150110.mBF1ArWe079741@svn.freebsd.org> From: Sam Leffler Date: Mon, 15 Dec 2008 01:10:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186104 - head/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2008 01:10:53 -0000 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);