From mboxrd@z Thu Jan 1 00:00:00 1970 From: claude Date: Mon, 16 Feb 2004 20:10:12 +0000 Subject: Re: Udev and Mylex Dac960 Message-Id: <403123A4.6080009@snscrew.net> List-Id: References: <4022CB7D.4010505@snscrew.net> In-Reply-To: <4022CB7D.4010505@snscrew.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org I've applied patch and it works great ! many thanks again ! Greg KH wrote: > On Mon, Feb 16, 2004 at 08:35:12AM +0100, claude wrote: > >>Yes output follow (i have to type : >> udevtest /block/rd\!c0d0 ) > > > Oops, sorry, forgot the leading '/' I need to document udevtest, I made > it for my testing but it looks like it really is handy to find problems > like this. > > >>main: version 017 >>udev_hotplug: looking at '/block/rd!c0d0' >>get_dirs: sysfs_path='/sys' >>parse_config_file: reading '/etc/udev/udev.conf' as config file >>namedev_init_rules: reading '/etc/udev/udev.rules' as rules file >>namedev_init_permissions: reading '/etc/udev/udev.permissions' as >>permissions file >>sleep_for_dev: looking for '/sys/block/rd!c0d0/dev' >>get_class_dev: looking at '/sys/block/rd!c0d0' >>get_class_dev: class_dev->name='rd!c0d0' >>get_major_minor: dev='48:0 >>' >>get_major_minor: found majorH, minor=0 >>get_blockdev_parent: rd!c0d0 not a partition >>sysfs_path_is_link: stat() failed >>sysfs_path_is_link: stat() failed >>sysfs_path_is_link: stat() failed >>sysfs_path_is_link: stat() failed >>sysfs_path_is_link: stat() failed >>sysfs_path_is_link: stat() failed >>sysfs_path_is_link: stat() failed >>sysfs_path_is_link: stat() failed >>sysfs_path_is_link: stat() failed >>sysfs_path_is_link: stat() failed >>get_sysfs_device: timed out waiting for device symlink, continuing on >>anyway... >>namedev_name_device: class_dev->name = 'rd!c0d0' >>namedev_name_device: udev->kernel_name = 'rd/c0d0' >>namedev_name_device: kernel_number='0' >>namedev_name_device: name, 'rd!c0d0' is going to have owner='root', >>group='root', mode = 0600 >>udev_add_device: name='rd!c0d0' >>creating device node '/dev/rd!c0d0' >>create_node: mknod(/dev/rd!c0d0, 020600, 48, 0) >>create_node: chmod(/dev/rd!c0d0, 020600) > > > Ah, found it. I was testing this with the following rule in my rules > file: > BUS="scsi", NAME="%k" > If you put that at the end of your udev.rules file, you should get the > proper name generated. > > Or you can apply the following patch, which will solve the problem if > you do not have a rule in udev.rules for this device. > > thanks a lot for helping me find the problem. > > greg k-h > > # Fix bug where we did not use the "converted" kernel name if we had no rule. > # > # This fixes the bug with names that have a ! in them and no rule to match. > > diff -Nru a/namedev.c b/namedev.c > --- a/namedev.c Mon Feb 16 10:19:58 2004 > +++ b/namedev.c Mon Feb 16 10:19:58 2004 > @@ -745,7 +745,7 @@ > } > > /* no rule was found so we use the kernel name */ > - strfieldcpy(udev->name, class_dev->name); > + strfieldcpy(udev->name, udev->kernel_name); > goto done; > > found: > ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id56&alloc_id438&op=click _______________________________________________ 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