From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Thu, 13 Nov 2003 19:49:03 +0000 Subject: Re: [udev] updated man, subdirs, ownership, namedev enum patches Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Thu, Nov 13, 2003 at 09:30:08AM +0100, Kay Sievers wrote: > On Wed, Nov 12, 2003 at 10:23:25PM -0800, Greg KH wrote: > > On Wed, Nov 12, 2003 at 02:23:30PM +0100, Kay Sievers wrote: > > > On Tue, Nov 11, 2003 at 07:53:55PM -0800, Greg KH wrote: > > > > On Wed, Nov 05, 2003 at 08:31:28PM +0100, Kay Sievers wrote: > > > > > 04-namedev.c-cleanup.diff > > > > > remove part of udev that appends the kernel enumeration to character devices > > > > > in LABEL method: NAME="webcam" results in /udev/webcam0 > > > > > > > > I think this patch breaks partition naming, did you try it on them? > > > > Hm, are you sure this patch is correct? > > > > > > I think so, block devices are handled at line 580. At line 626 the last > > > digit from kernel name is appended to _every_ device including char devs. > > > Partition naming seems ok with the patch, but i may miss something here. > > > > Hm, if you take those lines out, I can't name a partition with the > > number at the end of the name. Yeah, that's a hack, and I need to fix > > it up. > > What do you mean? > The partition name is crated with the number. > > Nov 13 09:01:24 pim udev[13671]: main: version 005 > Nov 13 09:01:24 pim udev[13671]: main: looking at /block/hda/hda1 > Nov 13 09:01:24 pim udev[13671]: get_dirs: sysfs_path = /sys > Nov 13 09:01:24 pim udev[13671]: namedev_init_config: opening /etc/udev/udev.config to read as config > Nov 13 09:01:24 pim udev[13671]: namedev_init_permissions: opening /etc/udev/udev.permissions to read as permissions config > Nov 13 09:01:24 pim udev[13671]: sleep_for_dev: looking for /sys/block/hda/hda1/dev > Nov 13 09:01:24 pim udev[13671]: get_class_dev: looking at /sys/block/hda/hda1 > Nov 13 09:01:24 pim udev[13671]: get_class_dev: class_dev->name = hda1 > Nov 13 09:01:24 pim udev[13671]: get_major_minor: dev = 3:1 > Nov 13 09:01:24 pim udev[13671]: get_major_minor: found major = 3, minor = 1 > Nov 13 09:01:24 pim udev[13671]: udev_add_device: name = hda1 > Nov 13 09:01:24 pim udev[13671]: create_node: mknod(/udev/hda1, 060666,3, 1) With no rules, yes. > Yes, it doesn't append the number when a label is specified for a > partition. But what when i want my partition labeled "data" not "data1" > LABEL, BUS="ide", size="117210177", NAME="data" Problem is, if you use the LABEL rule to match a device, like a SCSI vendor, then all of the partitions, as well as the main block device, will end up with the same name. That's why I added the "add the number" hack to the LABEL rule. So yes, your patch is correct in that we shouldn't always be adding the number to any match for LABEL (like for char devices), but if we do that, then we break partitions. Your '%' patch fixes this, but I'd just like to extend it a bit. Let me see what I can come up with... thanks, greg k-h ------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _______________________________________________ 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