device-mapper-multipath/0088-libmultipath-warn-about-missing-braces-at-end-of-mul.patch
Benjamin Marzinski 1dad67a5af device-mapper-multipath-0.8.5-1
Update Source to upstream version 0.8.5 plus post tag commits
  * Patches 0001-0102 are from
    https://github.com/openSUSE/multipath-tools/tree/queue and are
    already queued for upstream.
Rename files
  * Previous patches 0059-0068 are now patches 0103-0111
2021-01-19 18:06:09 -06:00

43 lines
1.2 KiB
Diff

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