From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Marco d'Itri" Date: Tue, 25 Nov 2003 13:29:17 +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 Nov 24, Arnd Bergmann wrote: >+ 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; After seeing this I started thinking about devfs-like devices and I tough that, as soon as the kernel will export a node which will allow recognizing CD devices, this could part of the default udev.config shipped by a distribution (I'd like to do this for debian): NUMBER, BUS="ide", id="0.0", NAME="ide/host0/bus0/target0/lun0/%N" NUMBER, BUS="ide", id="0.1", NAME="ide/host0/bus0/target1/lun0/%N" NUMBER, BUS="ide", id="1.0", NAME="ide/host0/bus1/target0/lun0/%N" NUMBER, BUS="ide", id="1.1", NAME="ide/host0/bus1/target1/lun0/%N" NUMBER, BUS="ide", id="0.0", type="cd", NAME="ide/host0/bus0/target0/lun0/cd" NUMBER, BUS="ide", id="0.1", type="cd", NAME="ide/host0/bus0/target1/lun0/cd" NUMBER, BUS="ide", id="1.0", type="cd", NAME="ide/host0/bus1/target0/lun0/cd" NUMBER, BUS="ide", id="1.1", type="cd", NAME="ide/host0/bus1/target1/lun0/cd" And this could be a possible syntax for managing symlinks: LINK would work just like NUMBER, but NAME would be a symlink to the device specified: # a trailing / means that the link will be done to the parent directory LINK, BUS="ide", id="0.0", NAME="discs/disc0/" LINK, BUS="ide", id="0.1", NAME="discs/disc1/" LINK, BUS="ide", id="1.0", NAME="discs/cdrom0" LINK, BUS="ide", id="1.1", NAME="discs/cdrom1" Related problem: if the ide-cd driver is modular then at boot time the block device nodes will not appear in sysfs, so udev will not create the devices in /dev. But if there are no devices which applications can open, how can the kernel autoload the module? Currently no hotplug method deals with this, so I'm not sure about what should load ide-cd at boot time. BTW, how can I configure udev to create devices like vc/%n instead of tty%n? -- ciao, | Marco | [3275 fipApyPRskOns] ------------------------------------------------------- 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