mirror of
https://github.com/systemd/systemd.git
synced 2026-07-24 16:25:52 +00:00
[PATCH] introduce OPTIONS=ignore_device, ignore_remove, all_partitions" key
Here we move all possible options into a own key to make it possible
to have options-only rules.
The options on the NAME key are removed from the man page and will
be removed from a future version of udev.
For ignore rules, OPTIONS="ignore" should be used.
The rule:
SUBSYSTEM="block", SYSFS{removable}="1", OPTIONS="all_partitions"
will create all partitions for a block device which is known to have
removable media (a check for cdrom drives would be needed too).
This commit is contained in:
committed by
Greg KH
parent
e57e7bc108
commit
fd9efc00a2
@@ -1018,6 +1018,37 @@ EOF
|
||||
exp_name => "cdrom",
|
||||
conf => <<EOF
|
||||
KERNEL="sda", NAME="cdrom%e"
|
||||
EOF
|
||||
},
|
||||
{
|
||||
desc => "ignore rule test",
|
||||
subsys => "block",
|
||||
devpath => "/block/sda",
|
||||
exp_name => "node",
|
||||
exp_error => "yes",
|
||||
conf => <<EOF
|
||||
BUS="scsi", KERNEL="sda", NAME="node", OPTIONS="ignore"
|
||||
EOF
|
||||
},
|
||||
{
|
||||
desc => "all_partitions, option-only rule",
|
||||
subsys => "block",
|
||||
devpath => "/block/sda",
|
||||
exp_name => "node6",
|
||||
conf => <<EOF
|
||||
SUBSYSTEM="block", OPTIONS="all_partitions"
|
||||
BUS="scsi", KERNEL="sda", NAME="node"
|
||||
EOF
|
||||
},
|
||||
{
|
||||
desc => "all_partitions, option-only rule (fail on partition)",
|
||||
subsys => "block",
|
||||
devpath => "/block/sda/sda1",
|
||||
exp_name => "node6",
|
||||
exp_error => "yes",
|
||||
conf => <<EOF
|
||||
SUBSYSTEM="block", OPTIONS="all_partitions"
|
||||
BUS="scsi", KERNEL="sda", NAME="node"
|
||||
EOF
|
||||
},
|
||||
{
|
||||
@@ -1027,7 +1058,7 @@ EOF
|
||||
exp_name => "node",
|
||||
exp_error => "yes",
|
||||
conf => <<EOF
|
||||
BUS="scsi", KERNEL="sda", NAME{ignore_remove}="node"
|
||||
BUS="scsi", KERNEL="sda", NAME="node", OPTIONS="ignore_remove"
|
||||
EOF
|
||||
},
|
||||
{
|
||||
@@ -1038,7 +1069,7 @@ EOF
|
||||
exp_error => "yes",
|
||||
option => "clear",
|
||||
conf => <<EOF
|
||||
BUS="scsi", KERNEL="sda", NAME{ignore_remove, all_partitions}="node"
|
||||
BUS="scsi", KERNEL="sda", NAME="node", OPTIONS="ignore_remove, all_partitions"
|
||||
EOF
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user