From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Tue, 02 Dec 2003 15:16:16 +0000 Subject: Re: [ANNOUNCE] udev 007 release MIME-Version: 1 Content-Type: multipart/mixed; boundary="8t9RHnE3ZwKMSgU+" Message-Id: List-Id: References: In-Reply-To: To: linux-hotplug@vger.kernel.org --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Dec 01, 2003 at 04:55:57PM -0800, Greg KH wrote: > On Mon, Dec 01, 2003 at 11:51:19AM +0100, Marco d'Itri wrote: > > On Nov 26, Greg KH wrote: > > >And then as your last REPLACE rule do: > > > REPLACE, KERNEL="tty*", NAME="vc/%n" > > I tried it, but it does not work. (And what about /dev/tty?) > > Care to enable DEBUG_PARSE in namedev.c and send me the output when > trying this? Along with your config files. Sorry, but we don't match against a wildcard now. Please try the following patch: 01-catch--replace-device-by-wildcard.diff catch device name by wildcard to support a whole class of devices by just one config line like: REPLACE, KERNEL="tty*", NAME="vc/%n" thanks, Kay --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="01-catch--replace-device-by-wildcard.diff" diff -Nru a/namedev.c b/namedev.c --- a/namedev.c Tue Dec 2 16:03:35 2003 +++ b/namedev.c Tue Dec 2 16:03:35 2003 @@ -860,8 +860,8 @@ continue; dbg_parse("compare name '%s' with '%s'", - dev->kernel_name, dev->name); - if (strcmp(dev->kernel_name, class_dev->name) != 0) + dev->kernel_name, class_dev->name); + if (strncmp_wildcard(class_dev->name, dev->kernel_name, NAME_SIZE) != 0) continue; strfieldcpy(udev->name, dev->name); diff -Nru a/test/udev-test.pl b/test/udev-test.pl --- a/test/udev-test.pl Tue Dec 2 16:03:35 2003 +++ b/test/udev-test.pl Tue Dec 2 16:03:35 2003 @@ -51,6 +51,15 @@ EOF }, { + desc => "catch device by wildcard", + subsys => "tty", + devpath => "class/tty/ttyUSB0", + expected => "visor/0" , + conf => < "replace kernel name", subsys => "tty", devpath => "class/tty/ttyUSB0", --8t9RHnE3ZwKMSgU+-- ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel