[dm-devel] [PATCH 14/35] libmultipath: rlookup_binding(): remove newline in log message

mwilck at suse.com mwilck at suse.com
Thu Jul 9 10:15:59 UTC 2020


From: Martin Wilck <mwilck at suse.com>

This clutters the log. The corresponding message in lookup_binding()
doesn't have a newline, either.

Signed-off-by: Martin Wilck <mwilck at suse.com>
---
 libmultipath/alias.c | 2 +-
 tests/alias.c        | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libmultipath/alias.c b/libmultipath/alias.c
index 14401ca..35f1beb 100644
--- a/libmultipath/alias.c
+++ b/libmultipath/alias.c
@@ -215,7 +215,7 @@ rlookup_binding(FILE *f, char *buff, const char *map_alias)
 		}
 		if (strcmp(alias, map_alias) == 0){
 			condlog(3, "Found matching alias [%s] in bindings file."
-				"\nSetting wwid to %s", alias, wwid);
+				" Setting wwid to %s", alias, wwid);
 			strlcpy(buff, wwid, WWID_SIZE);
 			return 0;
 		}
diff --git a/tests/alias.c b/tests/alias.c
index 30414db..22ffd55 100644
--- a/tests/alias.c
+++ b/tests/alias.c
@@ -552,7 +552,7 @@ static void rl_match_a(void **state)
 
 	buf[0] = '\0';
 	will_return(__wrap_fgets, "MPATHa WWID0\n");
-	expect_condlog(3, "Found matching alias [MPATHa] in bindings file.\n"
+	expect_condlog(3, "Found matching alias [MPATHa] in bindings file. "
 		       "Setting wwid to WWID0\n");
 	rc = rlookup_binding(NULL, buf, "MPATHa");
 	assert_int_equal(rc, 0);
@@ -617,7 +617,7 @@ static void rl_match_b(void **state)
 	will_return(__wrap_fgets, "MPATHa WWID0\n");
 	will_return(__wrap_fgets, "MPATHz WWID26\n");
 	will_return(__wrap_fgets, "MPATHb WWID2\n");
-	expect_condlog(3, "Found matching alias [MPATHb] in bindings file.\n"
+	expect_condlog(3, "Found matching alias [MPATHb] in bindings file. "
 		       "Setting wwid to WWID2\n");
 	rc = rlookup_binding(NULL, buf, "MPATHb");
 	assert_int_equal(rc, 0);
-- 
2.26.2





More information about the dm-devel mailing list