* Udev 100: Inconsistency in 60-persistent-storage.rules?
@ 2006-09-22 10:56 Alexander E. Patrakov
2006-09-22 11:10 ` Kay Sievers
0 siblings, 1 reply; 2+ messages in thread
From: Alexander E. Patrakov @ 2006-09-22 10:56 UTC (permalink / raw)
To: linux-hotplug
Hello,
the 60-persistent-storage.rules file contains the following rules:
# never access non-cdrom removable ide devices, the drivers are causing
event loops on open()
KERNEL="hd*[!0-9]", ATTRS{removable}="1",
DRIVERS="ide-cs|ide-floppy", GOTO="persistent_storage_end"
KERNEL="hd*[0-9]", ATTRS{removable}="1", GOTO="persistent_storage_end"
# <snip>
# by-label/by-uuid (filesystem properties)
KERNEL="*[!0-9]", ATTR{removable}="1", GOTO="persistent_storage_end"
# <snip>
LABEL="persistent_storage_end"
What's the reason for the ATTRS vs ATTR difference? Where exactly does
the "removable" attribute live in sysfs?
--
Alexander E. Patrakov
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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: Udev 100: Inconsistency in 60-persistent-storage.rules?
2006-09-22 10:56 Udev 100: Inconsistency in 60-persistent-storage.rules? Alexander E. Patrakov
@ 2006-09-22 11:10 ` Kay Sievers
0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2006-09-22 11:10 UTC (permalink / raw)
To: linux-hotplug
On Fri, 2006-09-22 at 16:56 +0600, Alexander E. Patrakov wrote:
> Hello,
>
> the 60-persistent-storage.rules file contains the following rules:
>
> # never access non-cdrom removable ide devices, the drivers are causing
> event loops on open()
> KERNEL="hd*[!0-9]", ATTRS{removable}="1",
> DRIVERS="ide-cs|ide-floppy", GOTO="persistent_storage_end"
> KERNEL="hd*[0-9]", ATTRS{removable}="1", GOTO="persistent_storage_end"
>
> # <snip>
>
> # by-label/by-uuid (filesystem properties)
> KERNEL="*[!0-9]", ATTR{removable}="1", GOTO="persistent_storage_end"
>
> # <snip>
>
> LABEL="persistent_storage_end"
>
> What's the reason for the ATTRS vs ATTR difference? Where exactly does
> the "removable" attribute live in sysfs?
The "removable" attribute is a disk, not a partition attribute.
ATTR matches only on the device we receive the event for, ATTRS searches
up the chain of parents for a match. ATTRS, like all other *S keys is
usually more expensive, cause we may need to walk up the parent devices
to see that nothing matches.
KERNEL="*[!0-9]", ATTR{removable}="1" matches only the disk device
here, where the attribute is expected.
KERNEL="hd*[0-9]", ATTRS{removable}="1" will find the "removable"
attribute of the disk, which is the parent of the partition we match on
with KERNEL.
KERNEL="hd*[!0-9]", ATTRS{removable}="1" could be ATTR I think, cause
it will not run for a partition anyway cause of the KERNEL match.
Kay
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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:[~2006-09-22 11:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-22 10:56 Udev 100: Inconsistency in 60-persistent-storage.rules? Alexander E. Patrakov
2006-09-22 11:10 ` 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).