Fix from: Hannes Reinecke <hare@suse.de>
namedev_parse is a bit overzealous when in comes to handling backspaces;
it always eats up backspaces regardless of anything beyond that. This
means it is impossible to enter '\t' in a rule. Quite a bit of fun when
you're trying to write regexps.
/* skip backslash and newline from multi line rules */
for (i = j = 0; i < count; i++) {
- if (bufline[i] == '\\' || bufline[i] == '\n')
+ if (bufline[i] == '\\' && bufline[i+1] == '\n')
continue;
line[j++] = bufline[i];
KERNEL="ttyUSB0", \\
NAME="visor"
+EOF
+ },
+ {
+ desc => "preserve backslashes, if they are not for a newline",
+ subsys => "tty",
+ devpath => "/class/tty/ttyUSB0",
+ exp_name => "aaa",
+ conf => <<EOF
+KERNEL="ttyUSB0", PROGRAM="/bin/echo -e \\101", RESULT="A", NAME="aaa"
EOF
},
{