From 69aa6dfb7081de376769cf712d1a8832f4346516 Mon Sep 17 00:00:00 2001 From: "kay.sievers@vrfy.org" Date: Thu, 10 Feb 2005 09:03:55 +0100 Subject: [PATCH] add %P modifier to query the node name of the parent device Events for partition devies may want to read the main block device name to compose it's own name or read a disklabel from the main device. SUBSYSTEM="block", KERNEL="*[1-9]", NAME="%P-p%n" will append the partition number to the name of the main block device. --- test/udev-test.pl | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'test/udev-test.pl') diff --git a/test/udev-test.pl b/test/udev-test.pl index fa1e4affc6..5a519ef13b 100644 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -968,7 +968,7 @@ KERNEL="sda", NAME="cdrom%e" EOF }, { - desc => "enumeration char test sequence (1/5 keep)", + desc => "enumeration char test sequence 1/5 (keep)", subsys => "block", devpath => "/block/sda", exp_name => "cdrom", @@ -1084,6 +1084,36 @@ EOF exp_name => "sda", conf => < "parent node name substitution test sequence 1/2 (keep)", + subsys => "block", + devpath => "/block/sda", + exp_name => "main_device", + option => "keep", + conf => < "parent node name substitution test sequence 2/2 (clean)", + subsys => "block", + devpath => "/block/sda/sda1", + exp_name => "main_device-part-1", + option => "clean", + conf => < "udev_root substitution", + subsys => "block", + devpath => "/block/sda/sda1", + exp_name => "start-udev-root-end", + option => "clean", + conf => <