NAME{all_partitions}, how does it work?
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_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 19 lines · Anssi Saari
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}"
Quoted 8 lines
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 createdSo 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_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Kay Sievers
please try:
BUS="scsi", SYSFS_vendor="6-in-1 ", SYSFS_model="CF/MD ", NAME{all_partitions}="cf%n"
Thanks, it works now.
Quoted 2 lines
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_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 13 lines · Anssi Saari
Quoted 3 lines · Kay Sievers
please try:
BUS="scsi", SYSFS_vendor="6-in-1 ", SYSFS_model="CF/MD ", NAME{all_partitions}="cf%n"
Thanks, it works now.
Quoted 2 lines
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:
Quoted 8 lines
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_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel