From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Date: Mon, 24 Nov 2003 03:19:45 +0000 Subject: Re: [ANNOUNCE] udev 007 release 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 Monday 24 November 2003 01:29, Greg KH wrote: > I think with the ability to capture the output of the CALLOUT rule, > combined with the ability to put format modifiers in the CALLOUT program > string, we now have everything in place to emulate the existing devfs > naming scheme. Anyone want to verify this or not? I would prefer to have the ability of creating partition nodes in devfs style built-in to udev. Devfs used to call the whole disk e.g. "/dev/dasd/0123/disk" and the partitions "/dev/dasd/0123/part[1-3]". This can obviously be done with a CALLOUT rule, but its common enough to make it a format modifier. AFAIK, this scheme has been used for ide, scsi and dasd disks, which is about 99% of all disks ever connected to Linux. One thing that does not appear to be possible with udev but was common with devfs is to have multiple links for the same device node, e.g. /dev/hda1 as well as /dev/ide/host0/bus0/target0/lun0/part1 and /dev/disk/0/part1. Arnd <>< === namedev.c 1.45 vs edited ==--- 1.45/namedev.c Sun Nov 23 23:25:12 2003 +++ edited/namedev.c Mon Nov 24 04:01:10 2003 @@ -523,6 +523,15 @@ strcat(pos, udev->kernel_number); dbg("substitute kernel number '%s'", udev->kernel_number); break; + case 'N': + if (strlen(udev->kernel_number) = 0) { + strcat(pos, "disk"); + break; + } + strcat(pos, "part"); + strcat(pos, udev->kernel_number); + dbg("substitute kernel number '%s'", udev->kernel_number); + break; case 'm': sprintf(pos, "%u", udev->minor); dbg("substitute minor number '%u'", udev->minor); ------------------------------------------------------- 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