27 lines
923 B
Diff
27 lines
923 B
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Martin Wilck <mwilck@suse.com>
|
||
|
Date: Tue, 27 Sep 2022 12:14:09 +0200
|
||
|
Subject: [PATCH] multipath: avoid NULL string in released_to_systemd()
|
||
|
|
||
|
Fixes: b28c406 ("multipath -u: don't grab devices already passed to system")
|
||
|
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||
|
---
|
||
|
multipath/main.c | 3 ++-
|
||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/multipath/main.c b/multipath/main.c
|
||
|
index 7b69a3ce..b9f360b4 100644
|
||
|
--- a/multipath/main.c
|
||
|
+++ b/multipath/main.c
|
||
|
@@ -435,7 +435,8 @@ static bool released_to_systemd(void)
|
||
|
bool ret;
|
||
|
|
||
|
ret = dm_mp_dev_path != NULL && !strcmp(dm_mp_dev_path, "0");
|
||
|
- condlog(4, "%s: %s=%s -> %d", __func__, dmdp, dm_mp_dev_path, ret);
|
||
|
+ condlog(4, "%s: %s=%s -> %d", __func__, dmdp,
|
||
|
+ dm_mp_dev_path ? dm_mp_dev_path : "", ret);
|
||
|
return ret;
|
||
|
}
|
||
|
|