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: Problem in udev with %e device numbering
Date: Sat, 29 Jan 2005 19:53:15 +0000	[thread overview]
Message-ID: <1107028395.15849.21.camel@localhost.localdomain> (raw)
In-Reply-To: <200501291853.30595.gutmann@uni-duesseldorf.de>

On Sat, 2005-01-29 at 18:53 +0100, Michael Gutmann wrote:
> device numbering with %e breaks with NAME{all_partitions} when using 
> usb-devices that attach more than one virtual scsi-disk. I've got a 
> multi-card-reader that announces itself as four scsi-drives, even if 
> no card is plugged in. Partitions certainly can be found only when a 
> card is put into the card reader. Unfortunately they are only found if 
> something tries to use the card, f.e. fdisk.

If you don't use anything that polls the device for a media change,
which is what all major desktop installation do today, you don't get
these nodes, yes.

> So I have to use NAME(all_partitions}. No problem so far, but I want to
> use symbolic names instead of sd?. But if I use SYMLINK="cardreader%e" 
> f.e. there are only links to sd[abcd] and not to the partitions.
> The only way I see is using NAME{all_partitions}="card%e".

There is no sane way to use the %e key in cases you get concurrent
events asking for enumeration of the same name. It's a too simple hack
and there is no way with the current udev model to get this fixed inside
of udev.

The only sane solution, I can imagine would be an external program, that
does the enumeration and returns the value to udev. This external
program would need to maintain its own database in a dotfile in /dev and
must use a file lock to serialize concurrent processes asking for the
value. This topic was already discussed on this list, you may look at
the archives...

Kay



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
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:[~2005-01-29 19:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-29 17:53 Problem in udev with %e device numbering Michael Gutmann
2005-01-29 19:53 ` Kay Sievers [this message]
2005-01-30 10:39 ` Michael Gutmann
2005-01-30 14:58 ` Kay Sievers

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