diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2004-01-13 18:34:33 -0800 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:13:16 -0700 |
commit | 8ffb636f013a193688b132b8512e77b0747c41a1 (patch) | |
tree | 1236ac40963c0ad6a239a872916017a7eb3ad07d /test | |
parent | e68faf511dd9be15a27042d1828460d3655707d8 (diff) |
[PATCH] udev - introduce format escape char
This patch adds a '%' to the format char list, so that a external
program may called with a non expanded '%' like:
PROGRAM="/bin/date +%%s"
Olaf Hering asked for the feature.
A tricky test is also added :)
Diffstat (limited to 'test')
-rw-r--r-- | test/udev-test.pl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl index ab27c74c6a..5e5756b660 100644 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -206,6 +206,15 @@ BUS="scsi", PROGRAM="/bin/echo -n test-%b", RESULT="test-0:0*", NAME="%c" EOF }, { + desc => "program with escaped format char (tricky: callout returns format char!)", + subsys => "block", + devpath => "block/sda/sda3", + expected => "escape-3" , + conf => <<EOF +BUS="scsi", PROGRAM="/bin/echo -n escape-%%n", KERNEL="sda3", NAME="%c" +EOF + }, + { desc => "program result substitution (numbered part of)", subsys => "block", devpath => "block/sda/sda3", |