linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: claude <claude@snscrew.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: Udev and Mylex Dac960
Date: Mon, 16 Feb 2004 20:10:12 +0000	[thread overview]
Message-ID: <403123A4.6080009@snscrew.net> (raw)
In-Reply-To: <4022CB7D.4010505@snscrew.net>

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_id\x1356&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

      parent reply	other threads:[~2004-02-16 20:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-05 23:02 Udev and Mylex Dac960 claude
2004-02-06  0:07 ` Greg KH
2004-02-06 14:40 ` claude
2004-02-07 19:04 ` claude
2004-02-11 23:49 ` Greg KH
2004-02-12  1:41 ` Greg KH
2004-02-12  2:02 ` claude
2004-02-13 21:05 ` Greg KH
2004-02-16  5:46 ` claude
2004-02-16  5:52 ` Greg KH
2004-02-16  7:35 ` claude
2004-02-16 18:22 ` Greg KH
2004-02-16 20:10 ` claude [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=403123A4.6080009@snscrew.net \
    --to=claude@snscrew.net \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).