Re: udev removable media

From: Greg KH
Date: Fri Sep 03 2004 - 06:44:59 EST


On Fri, Sep 03, 2004 at 01:28:33PM +0200, Roeland Moors wrote:
> I have an USB zip drive in combination with udev.
>
> When I connect the drive with a disk inserted, everything works
> fine. Here is the udev rule:
> BUS="usb", SYSFS{product}="USB Zip 750", KERNEL="sd?1",
> NAME="%k", SYMLINK="zip"
>
> When connecting the drive without a disk the symlink is not
> created. This is ok, beceause there is no disk.
>
> But if I now insert a disk, there is still no symlink?

That's because we don't get a "media inserted" event, sorry.

> I've search a bit on google and if I understand correctly the
> main problem is the SCSI protocol.
>
> Is there a solution to this problem?

You can use the "all_partitions" solution in udev to always create the
partition device nodes. See the udev manpage for more information.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/