linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: can udev SYMLINK{all_partitions} ?
Date: Wed, 08 Sep 2004 22:40:46 +0000	[thread overview]
Message-ID: <1094683247.3375.12.camel@localhost.localdomain> (raw)
In-Reply-To: <20040908193625.26490.h64.wm@smtp.sc0.cp.net>

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

      reply	other threads:[~2004-09-08 22:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-08 19:36 can udev SYMLINK{all_partitions} ? linux-hotplug-devel
2004-09-08 22:40 ` Kay Sievers [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=1094683247.3375.12.camel@localhost.localdomain \
    --to=kay.sievers@vrfy.org \
    --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).