linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* NAME{all_partitions}, how does it work?
@ 2004-02-28 19:44 Anssi Saari
  2004-02-28 20:19 ` Kay Sievers
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Anssi Saari @ 2004-02-28 19:44 UTC (permalink / raw)
  To: linux-hotplug


I have a multiple memory card reader thing for USB with four slots. I'm
using this currently in udev.rules:

# Iwill 6-in-1 memory card reader
BUS="scsi", SYSFS_vendor="6-in-1  ", SYSFS_model="CF/MD           ", NAME="cf%n"
BUS="scsi", SYSFS_vendor="6-in-1  ", SYSFS_model="SM              ", NAME="sm%n"
BUS="scsi", SYSFS_vendor="6-in-1  ", SYSFS_model="SD/MMC          ", NAME="sd_mmc%n"
BUS="scsi", SYSFS_vendor="6-in-1  ", SYSFS_model="MS              ", NAME="ms%n"

And it works, except that if there are no cards when I plug the reader
in, no devices for partitions are created and apparently plugging in a
memory card in the reader is not a hotplug event.

The manpage says to use NAME{all_partitions} to get all 15 partitions
of a block device created, so I tried

BUS="scsi", SYSFS_vendor="6-in-1  ", SYSFS_model="CF/MD           ", NAME="cf%n{all_partitions}" 

and various other things, but all I was able to get was 

a) no device created
b) /udev/cf{all_partitions} was created
c) /udev/cf was created

So how is this really supposed to be used? Is it even a thing that could
help me?





-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&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] 4+ messages in thread

* Re: NAME{all_partitions}, how does it work?
  2004-02-28 19:44 NAME{all_partitions}, how does it work? Anssi Saari
@ 2004-02-28 20:19 ` Kay Sievers
  2004-02-29  6:02 ` Anssi Saari
  2004-02-29 13:39 ` Kay Sievers
  2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2004-02-28 20:19 UTC (permalink / raw)
  To: linux-hotplug

On Sat, Feb 28, 2004 at 09:44:05PM +0200, Anssi Saari wrote:
> 
> I have a multiple memory card reader thing for USB with four slots. I'm
> using this currently in udev.rules:
> 
> # Iwill 6-in-1 memory card reader
> BUS="scsi", SYSFS_vendor="6-in-1  ", SYSFS_model="CF/MD           ", NAME="cf%n"
> BUS="scsi", SYSFS_vendor="6-in-1  ", SYSFS_model="SM              ", NAME="sm%n"
> BUS="scsi", SYSFS_vendor="6-in-1  ", SYSFS_model="SD/MMC          ", NAME="sd_mmc%n"
> BUS="scsi", SYSFS_vendor="6-in-1  ", SYSFS_model="MS              ", NAME="ms%n"
> 
> And it works, except that if there are no cards when I plug the reader
> in, no devices for partitions are created and apparently plugging in a
> memory card in the reader is not a hotplug event.
> 
> The manpage says to use NAME{all_partitions} to get all 15 partitions
> of a block device created, so I tried
> 
> BUS="scsi", SYSFS_vendor="6-in-1  ", SYSFS_model="CF/MD           ", NAME="cf%n{all_partitions}" 
> 
> and various other things, but all I was able to get was 
> 
> a) no device created
> b) /udev/cf{all_partitions} was created
> c) /udev/cf was created
> 
> So how is this really supposed to be used? Is it even a thing that could
> help me?

please try:

  BUS="scsi", SYSFS_vendor="6-in-1  ", SYSFS_model="CF/MD           ", NAME{all_partitions}="cf%n"


The attribute belongs to the NAME field not to a format char.
It's mentioned in the man page :)

thanks,
Kay


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&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] 4+ messages in thread

* Re: NAME{all_partitions}, how does it work?
  2004-02-28 19:44 NAME{all_partitions}, how does it work? Anssi Saari
  2004-02-28 20:19 ` Kay Sievers
@ 2004-02-29  6:02 ` Anssi Saari
  2004-02-29 13:39 ` Kay Sievers
  2 siblings, 0 replies; 4+ messages in thread
From: Anssi Saari @ 2004-02-29  6:02 UTC (permalink / raw)
  To: linux-hotplug

On Sat, Feb 28, 2004 at 09:19:50PM +0100, Kay Sievers wrote:

> please try:
> 
>   BUS="scsi", SYSFS_vendor="6-in-1  ", SYSFS_model="CF/MD           ", NAME{all_partitions}="cf%n"
 
Thanks, it works now.
 
> The attribute belongs to the NAME field not to a format char.
> It's mentioned in the man page :)

Yes, I misunderstood the part saying this:

The NAME field given with the attribute NAME{all_partitions} will  create
all 15 partitions of a blockdevice.  This may be useful for removable
media devices.

I actually thought the NAME{all_partitions} referred to the device
name I had chosen. This was supported by the next part in the manpage,
"The NAME ,SYMLINK and PROGRAM fields support simple printf-like string
substitution".

Anyway, a working example is always the thing to avoid misunderstandings in
documentation.



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&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] 4+ messages in thread

* Re: NAME{all_partitions}, how does it work?
  2004-02-28 19:44 NAME{all_partitions}, how does it work? Anssi Saari
  2004-02-28 20:19 ` Kay Sievers
  2004-02-29  6:02 ` Anssi Saari
@ 2004-02-29 13:39 ` Kay Sievers
  2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2004-02-29 13:39 UTC (permalink / raw)
  To: linux-hotplug

On Sun, 2004-02-29 at 07:02, Anssi Saari wrote:
> On Sat, Feb 28, 2004 at 09:19:50PM +0100, Kay Sievers wrote:
> 
> > please try:
> > 
> >   BUS="scsi", SYSFS_vendor="6-in-1  ", SYSFS_model="CF/MD           ", NAME{all_partitions}="cf%n"
>  
> Thanks, it works now.
>  
> > The attribute belongs to the NAME field not to a format char.
> > It's mentioned in the man page :)
> 
> Yes, I misunderstood the part saying this:
> 
> The NAME field given with the attribute NAME{all_partitions} will  create
> all 15 partitions of a blockdevice.  This may be useful for removable
> media devices.
> 
> I actually thought the NAME{all_partitions} referred to the device
> name I had chosen. This was supported by the next part in the manpage,
> "The NAME ,SYMLINK and PROGRAM fields support simple printf-like string
> substitution".

I sent a patch to the list, with the hope that it's better to understand
now. I've also added a example to udev.rules.examples.

thanks for pointing it out,
Kay



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&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] 4+ messages in thread

end of thread, other threads:[~2004-02-29 13:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-28 19:44 NAME{all_partitions}, how does it work? Anssi Saari
2004-02-28 20:19 ` Kay Sievers
2004-02-29  6:02 ` Anssi Saari
2004-02-29 13:39 ` 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).