Blame SOURCES/0045-libmultipath-warn-about-missing-braces-at-end-of-mul.patch

05be62
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
05be62
From: Benjamin Marzinski <bmarzins@redhat.com>
05be62
Date: Mon, 16 Nov 2020 13:52:09 -0600
05be62
Subject: [PATCH] libmultipath: warn about missing braces at end of
05be62
 multipath.conf
05be62
05be62
Multipath doesn't warn when multipath.conf is missing closing braces at
05be62
the end of the file. This has confused people about the correct config
05be62
file syntax, so add a warning.
05be62
05be62
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
05be62
---
05be62
 libmultipath/parser.c | 5 +++--
05be62
 1 file changed, 3 insertions(+), 2 deletions(-)
05be62
05be62
diff --git a/libmultipath/parser.c b/libmultipath/parser.c
05be62
index a7285a35..48b54e87 100644
05be62
--- a/libmultipath/parser.c
05be62
+++ b/libmultipath/parser.c
05be62
@@ -544,7 +544,7 @@ process_stream(struct config *conf, FILE *stream, vector keywords, char *file)
05be62
 		if (!strcmp(str, EOB)) {
05be62
 			if (kw_level > 0) {
05be62
 				free_strvec(strvec);
05be62
-				break;
05be62
+				goto out;
05be62
 			}
05be62
 			condlog(0, "unmatched '%s' at line %d of %s",
05be62
 				EOB, line_nr, file);
05be62
@@ -583,7 +583,8 @@ process_stream(struct config *conf, FILE *stream, vector keywords, char *file)
05be62
 
05be62
 		free_strvec(strvec);
05be62
 	}
05be62
-
05be62
+	if (kw_level == 1)
05be62
+		condlog(1, "missing '%s' at end of %s", EOB, file);
05be62
 out:
05be62
 	FREE(buf);
05be62
 	free_uniques(uniques);
05be62
-- 
05be62
2.17.2
05be62