@@ -392,7 +392,7 @@ snprint_dev_t (char * buff, size_t len, struct path * pp)
static int
snprint_offline (char * buff, size_t len, struct path * pp)
{
- if (!pp)
+ if (!pp || !pp->mpp)
return snprintf(buff, len, "unknown");
else if (pp->offline)
return snprintf(buff, len, "offline");
@@ -403,7 +403,7 @@ snprint_offline (char * buff, size_t len, struct path * pp)
static int
snprint_chk_state (char * buff, size_t len, struct path * pp)
{
- if (!pp)
+ if (!pp || !pp->mpp)
return snprintf(buff, len, "undef");
switch (pp->state) {
After a path device is orphaned, multipathd stops checking its state. However, multipathd show state still shows its old state. It should display "undef unknown" instead. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> --- libmultipath/print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)