summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2003-12-15 22:54:38 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:13:07 -0700
commitb1c5e3339deb97f4a30053111b444489a3bc9562 (patch)
tree55b8c3a031fcf01c4c8a9b48d8b3cd5f09f58377 /test
parent2052464275b50f27cc563aaee24aadd791a9d8ca (diff)
[PATCH] get part of callout return string
Try this patch if you like, to get special parts of the callout output. This beast works now: CALLOUT, BUS="scsi", PROGRAM="/bin/echo -n node link1 link2", ID="node *", NAME="%1c", SYMLINK="%2c %3c" The callout returned string is separated by spaces and is addressed by the "len" value of the 'c' format char. Since we support symlinks, this my be useful for other uses of callout too. introduce 'len number' for format chars the first use is 'c'-the callout return to select a part of the output string like: CALLOUT, BUS="scsi", PROGRAM="/bin/echo -n node link1 link2", ID="node *", NAME="%1c", SYMLINK="%2c %3c" (note: first part is requested by len=1, len=0 will return the whole string) add a test to udev-test.pl
Diffstat (limited to 'test')
-rw-r--r--test/udev-test.pl9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index 3dfbaa2530..1a35e3da82 100644
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -153,6 +153,15 @@ CALLOUT, BUS="scsi", PROGRAM="/bin/echo -n test-%b", ID="test-*", NAME="%c"
EOF
},
{
+ desc => "callout program substitution (numbered part of)",
+ subsys => "block",
+ devpath => "block/sda/sda3",
+ expected => "link1" ,
+ conf => <<EOF
+CALLOUT, BUS="scsi", PROGRAM="/bin/echo -n node link1 link2", ID="node *", NAME="%1c", SYMLINK="%2c %3c"
+EOF
+ },
+ {
desc => "devfs disk naming substitution",
subsys => "block",
devpath => "block/sda",