27 lines
1.0 KiB
Diff
27 lines
1.0 KiB
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Martin Wilck <mwilck@suse.com>
|
||
|
Date: Tue, 27 Sep 2022 12:28:26 +0200
|
||
|
Subject: [PATCH] libmultipath: avoid NULL string in is_udev_ready()
|
||
|
|
||
|
Fixes: 2b25a9e ("libmultipath: select_action(): force udev reload for uninitialized maps")
|
||
|
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||
|
---
|
||
|
libmultipath/configure.c | 3 ++-
|
||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
|
||
|
index e5249fc1..e551047a 100644
|
||
|
--- a/libmultipath/configure.c
|
||
|
+++ b/libmultipath/configure.c
|
||
|
@@ -662,7 +662,8 @@ static bool is_udev_ready(struct multipath *cmpp)
|
||
|
env = udev_device_get_property_value(mpp_ud, "MPATH_DEVICE_READY");
|
||
|
rc = (env != NULL && !strcmp(env, "1"));
|
||
|
udev_device_unref(mpp_ud);
|
||
|
- condlog(4, "%s: %s: \"%s\" -> %d\n", __func__, cmpp->alias, env, rc);
|
||
|
+ condlog(4, "%s: %s: \"%s\" -> %d\n", __func__, cmpp->alias,
|
||
|
+ env ? env : "", rc);
|
||
|
return rc;
|
||
|
}
|
||
|
|