From owner-freebsd-stable@FreeBSD.ORG Sun Jan 8 06:22:18 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 A437A16A41F; Sun, 8 Jan 2006 06:22:18 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 33CBF43D45; Sun, 8 Jan 2006 06:22:18 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k086JReE029682; Sat, 7 Jan 2006 23:19:27 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 07 Jan 2006 23:19:29 -0700 (MST) Message-Id: <20060107.231929.74404461.imp@bsdimp.com> To: gjp@in-addr.com From: "M. Warner Losh" In-Reply-To: <43C0A206.6020103@in-addr.com> References: <43C09F08.1080707@freebsd.org> <20060107.221615.106545203.imp@bsdimp.com> <43C0A206.6020103@in-addr.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 07 Jan 2006 23:19:41 -0700 (MST) 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 06:22:18 -0000 In message: <43C0A206.6020103@in-addr.com> Gary Palmer writes: : M. Warner Losh wrote: : : >This works. However, matches should already be case insensitive. If : >they aren't, then I need to investigate why not. : > : > : : My reading of regex(3) says that the reg_comp at line 173 of devd.cc : needs to add the REG_ICASE flag. i.e. : : regcomp(&_regex, _re.c_str(), REG_EXTENDED | REG_NOSUB | REG_ICASE); : : Testing seeems to show that adding that flag makes "match" case-insensitive. I found the same thing here, and committed a fix. Thanks! I'm still pondering equals. I'd like to have some way to specify masks with it, ideally, but maybe what you submitted is better enough to run with it. As Sam mentioned, he made very similar suggestions a while ago. Warner