summaryrefslogtreecommitdiff
path: root/util-linux/mdev.c
diff options
context:
space:
mode:
authorDenys Vlasenko2012-01-11 00:37:17 +0100
committerDenys Vlasenko2012-01-11 00:37:17 +0100
commit499597d6efb0de5bb6d6f52bda1f348478d7f5a9 (patch)
tree002da32a858f8c89cbacfe15f9d812c202810403 /util-linux/mdev.c
parent982fdaf4b2f335506e570a06d5eab09068da3f61 (diff)
downloadbusybox-499597d6efb0de5bb6d6f52bda1f348478d7f5a9.zip
busybox-499597d6efb0de5bb6d6f52bda1f348478d7f5a9.tar.gz
mdev: do not treat non-leading '#' chars as start of comment. Closes 4676
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/mdev.c')
-rw-r--r--util-linux/mdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index c6be1b8..e5f0c2d 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -206,7 +206,8 @@ static void parse_next_rule(void)
char *tokens[4];
char *val;
- if (!config_read(G.parser, tokens, 4, 3, "# \t", PARSE_NORMAL))
+ /* No PARSE_EOL_COMMENTS, because command may contain '#' chars */
+ if (!config_read(G.parser, tokens, 4, 3, "# \t", PARSE_NORMAL & ~PARSE_EOL_COMMENTS))
break;
/* Fields: [-]regex uid:gid mode [alias] [cmd] */