[dm-devel] [PATCH v2 2/5] libmultipath: config parser: don't strip whitepace between quotes
Martin Wilck
mwilck at suse.com
Wed Mar 7 23:26:17 UTC 2018
Between double quotes, the parser currently strips leading (but not
trailing) whitespace. That's inconsistent and unexpected. Fix it.
Signed-off-by: Martin Wilck <mwilck at suse.com>
---
libmultipath/parser.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libmultipath/parser.c b/libmultipath/parser.c
index 5caa2019a1a4..3d9656f47945 100644
--- a/libmultipath/parser.c
+++ b/libmultipath/parser.c
@@ -262,7 +262,8 @@ alloc_strvec(char *string)
}
vector_set_slot(strvec, token);
- while ((isspace((int) *cp) || !isascii((int) *cp))
+ while ((!in_string &&
+ (isspace((int) *cp) || !isascii((int) *cp)))
&& *cp != '\0')
cp++;
if (*cp == '\0' || *cp == '!' || *cp == '#')
--
2.16.1
More information about the dm-devel
mailing list