linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* can udev SYMLINK{all_partitions} ?
@ 2004-09-08 19:36 linux-hotplug-devel
  2004-09-08 22:40 ` Kay Sievers
  0 siblings, 1 reply; 2+ messages in thread
From: linux-hotplug-devel @ 2004-09-08 19:36 UTC (permalink / raw)
  To: linux-hotplug

I've been using the NAME{all_partitions} syntax successfully for a usb card reader, but I also need a symlink created for each partition as
well. For example, I would like both the normal /dev/sda1,/dev/sda2, etc. AND /dev/usb/cf1,/dev/usb/cf2, etc. accessible.  The goal is to
use udev to maintain all the normal kernel names while creating symlinks to more intuitive spots that may be automounted for other users who
don't want to mess with /dev/sdX.
Going out on a limb, I tried the syntax SYMLINK{all_partitions} with several variations (which didn't work) including:
BUS="scsi", KERNEL="sd*", SYSFS{model}="*HS-CF*" ,SYSFS{vendor}="*IN-WIN*", NAME{all_partitions}="%k", SYMLINK{all_partitions}="usb/cf"
BUS="scsi", KERNEL="sd*", SYSFS{model}="*HS-CF*" ,SYSFS{vendor}="*IN-WIN*", NAME{all_partitions}="%k", SYMLINK{all_partitions}="usb/cf%n"

Am I missing an easy way to achieve this, or is someone already working on a SYMLINK{all_partitions} syntax?
  
Thanks,
Mike


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idP47&alloc_id\x10808&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] 2+ messages in thread

* Re: can udev SYMLINK{all_partitions} ?
  2004-09-08 19:36 can udev SYMLINK{all_partitions} ? linux-hotplug-devel
@ 2004-09-08 22:40 ` Kay Sievers
  0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2004-09-08 22:40 UTC (permalink / raw)
  To: linux-hotplug

On Wed, 2004-09-08 at 12:36 -0700, linux-hotplug-devel@digitalride.net
wrote:
> I've been using the NAME{all_partitions} syntax successfully for a usb card reader, but I also need a symlink created for each partition as
> well. For example, I would like both the normal /dev/sda1,/dev/sda2, etc. AND /dev/usb/cf1,/dev/usb/cf2, etc. accessible.  The goal is to
> use udev to maintain all the normal kernel names while creating symlinks to more intuitive spots that may be automounted for other users who
> don't want to mess with /dev/sdX.
> Going out on a limb, I tried the syntax SYMLINK{all_partitions} with several variations (which didn't work) including:
> BUS="scsi", KERNEL="sd*", SYSFS{model}="*HS-CF*" ,SYSFS{vendor}="*IN-WIN*", NAME{all_partitions}="%k", SYMLINK{all_partitions}="usb/cf"
> BUS="scsi", KERNEL="sd*", SYSFS{model}="*HS-CF*" ,SYSFS{vendor}="*IN-WIN*", NAME{all_partitions}="%k", SYMLINK{all_partitions}="usb/cf%n"
> 
> Am I missing an easy way to achieve this,

There is currently no way to do this with the built-in features of udev.
If you don't care about stale symlinks (ones that don't get removed on
device removal) you may create them with a simple CALLOUT shell-script.
It's a bit ugly, but it should work.

Or just consider using any of the volume daemons that poll your device
for media changes. This way you don't need the all_partitions feature at
all.
I'm using HAL for this, which polls all removable devices and have long
forgotten the all_partitions :)

> or is someone already working on a SYMLINK{all_partitions} syntax?

No, it's not easy to reach this. The symlink feature in udev is a very
simple implementation, only one string with all the symlinks separated
by spaces is stored in the udevdb. So there is currently no way to store
how many all_partitions-symlinks need to be removed on the "remove"
event.

Thanks,
Kay



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idP47&alloc_id\x10808&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] 2+ messages in thread

end of thread, other threads:[~2004-09-08 22:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-08 19:36 can udev SYMLINK{all_partitions} ? linux-hotplug-devel
2004-09-08 22:40 ` Kay Sievers

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).