From 499597d6efb0de5bb6d6f52bda1f348478d7f5a9 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 11 Jan 2012 00:37:17 +0100 Subject: mdev: do not treat non-leading '#' chars as start of comment. Closes 4676 Signed-off-by: Denys Vlasenko --- util-linux/mdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util-linux/mdev.c') diff --git a/util-linux/mdev.c b/util-linux/mdev.c index c6be1b872..e5f0c2deb 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] */ -- cgit v1.2.3