From owner-freebsd-stable@FreeBSD.ORG Sun Jan 8 02:36:47 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A6D816A41F; Sun, 8 Jan 2006 02:36:47 +0000 (GMT) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB46843D46; Sun, 8 Jan 2006 02:36:46 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.248] (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id k082aXo7047461 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 7 Jan 2006 18:36:33 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <43C07B16.7050505@errno.com> Date: Sat, 07 Jan 2006 18:38:14 -0800 From: Sam Leffler User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051227) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Gary Palmer References: <43C05270.60106@freebsd.org> In-Reply-To: <43C05270.60106@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: Re: devd and caseful device ID matching on 6.0 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2006 02:36:47 -0000 Gary Palmer wrote: > Hi Warner, > > I've been playing with devd and noticed that if you do something like: > > # > # Dell TrueMobile 1300 WLAN PC Card > # > nomatch 10 { > match "bus" "pci[0-9]+"; > match "vendor" "0x14E4"; > match "device" "0x4320"; > match "subvendor" "0x1028"; > match "subdevice" "0x0002"; > action "kldload BCMWL5_SYS"; > }; > > it won't match (at least on 6.0) as the regex that is used is case > sensitive. Since these are hex numbers, could the comparison not be > case insensitive? I'm not sure what implications just making the regex > case insensitive will have on other matching clauses (e.g. for "system"). At one point I added shorthand logic in devd for things like vendor, device, subvendor, etc. that did numeric comparisons instead of regex's. It might be worthwhile to extend the grammar to have a numeric match operator. Sam