* renaming causes incorrect device creation
@ 2004-03-17 2:14 xsdg
2004-03-17 7:44 ` Bob Barry
2004-03-17 8:33 ` Bob Barry
0 siblings, 2 replies; 3+ messages in thread
From: xsdg @ 2004-03-17 2:14 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 1153 bytes --]
Normally, when I plug in my camera, I see (in /udev/):
brw------- 1 root root 8, 0 2004-03-17 01:53 sda
brw------- 1 root root 8, 1 2004-03-17 01:53 sda1
I then add to udev.rules:
BUS=3D"scsi", SYSFS{model}=3D"Sony DSC ", NAME=3D"removable/camera%n"
after adding, I see:
brw------- 1 root root 8, 0 2004-03-17 01:55 camera
crw------- 1 root root 21, 1 2004-03-17 01:55 camera1
I'm starting off with the default installed udev.rules. This also occurs when
I try to get my key drive going with:
BUS=3D"scsi", SYSFS{vendor}=3D"LEXAR ", SYSFS{model}=3D"JUMPDRIVE PRO ", NAME=3D"removable/jdrive%n"
brw------- 1 root root 8, 16 2004-03-17 01:31 jdrive
crw------- 1 root root 21, 2 2004-03-17 01:31 jdrive2
Also note that jdrive2 should not exist; only disc and generic exist in devfs,
and I set the drive up _without_ partitioning (mkfs.vfat /udev/sda)
--
| If you have to do something wrong to get what you |
| want, it's really not worth having. |
) http://www.cuodan.net/~xsdg/ xsdg@freenode.org (
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: renaming causes incorrect device creation
2004-03-17 2:14 renaming causes incorrect device creation xsdg
@ 2004-03-17 7:44 ` Bob Barry
2004-03-17 8:33 ` Bob Barry
1 sibling, 0 replies; 3+ messages in thread
From: Bob Barry @ 2004-03-17 7:44 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 840 bytes --]
On Wednesday 17 March 2004, xsdg wrote:
> Normally, when I plug in my camera, I see (in /udev/):
>
> brw------- 1 root root 8, 0 2004-03-17 01:53 sda
> brw------- 1 root root 8, 1 2004-03-17 01:53 sda1
>
> I then add to udev.rules:
> BUS="scsi", SYSFS{model}="Sony DSC ", NAME="removable/camera%n"
I used the following rule successfully...
# USB storage of Sony DSC-31 camera
BUS="usb", SYSFS{product}="Sony DSC" NAME="%k" SYMLINK="camera"
...until I built the "generic devices" module, and found that char device sg2
was being assigned to the camera. So I changed the rule and it works again:
# USB storage of Sony DSC-31 camera
BUS="usb", KERNEL="sd*", SYSFS{product}="Sony DSC" NAME="%k" SYMLINK="camera"
OT: The script I use to download from the camera is attached.
[-- Attachment #2: getpix --]
[-- Type: application/x-shellscript, Size: 586 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: renaming causes incorrect device creation
2004-03-17 2:14 renaming causes incorrect device creation xsdg
2004-03-17 7:44 ` Bob Barry
@ 2004-03-17 8:33 ` Bob Barry
1 sibling, 0 replies; 3+ messages in thread
From: Bob Barry @ 2004-03-17 8:33 UTC (permalink / raw)
To: linux-hotplug
On Wednesday 17 March 2004 09:44, Bob Barry wrote:
> So I changed the rule and it works again:
> BUS="usb", KERNEL="sd*", SYSFS{product}="Sony DSC" NAME="%k" SYMLINK="camera"
That still wasn't really right. Using udevtest in a loop for all "udevinfo -d" devices showed that the
camera symlink was being created twice (for sda and sda1) with the last one prevailing. Without the
"KERNEL" qualification, it was getting created three times, and sg2 prevailed. Changing the "KERNEL"
qualification to "sd??" eliminates spurious symlink creation:
BUS="usb", KERNEL="sd??", SYSFS{product}="Sony DSC" NAME="%k" SYMLINK="camera"
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-03-17 8:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-17 2:14 renaming causes incorrect device creation xsdg
2004-03-17 7:44 ` Bob Barry
2004-03-17 8:33 ` Bob Barry
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).