Blame SOURCES/0200-RHBZ-1402092-orphan-status.patch
|
|
4728c8 |
---
|
|
|
4728c8 |
libmultipath/print.c | 7 ++++++-
|
|
|
4728c8 |
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
4728c8 |
|
|
|
4728c8 |
Index: multipath-tools-130222/libmultipath/print.c
|
|
|
4728c8 |
===================================================================
|
|
|
4728c8 |
--- multipath-tools-130222.orig/libmultipath/print.c
|
|
|
4728c8 |
+++ multipath-tools-130222/libmultipath/print.c
|
|
|
4728c8 |
@@ -386,7 +386,9 @@ snprint_dev_t (char * buff, size_t len,
|
|
|
4728c8 |
static int
|
|
|
4728c8 |
snprint_offline (char * buff, size_t len, struct path * pp)
|
|
|
4728c8 |
{
|
|
|
4728c8 |
- if (pp->offline)
|
|
|
4728c8 |
+ if (!pp || !pp->mpp)
|
|
|
4728c8 |
+ return snprintf(buff, len, "unknown");
|
|
|
4728c8 |
+ else if (pp->offline)
|
|
|
4728c8 |
return snprintf(buff, len, "offline");
|
|
|
4728c8 |
else
|
|
|
4728c8 |
return snprintf(buff, len, "running");
|
|
|
4728c8 |
@@ -395,6 +397,9 @@ snprint_offline (char * buff, size_t len
|
|
|
4728c8 |
static int
|
|
|
4728c8 |
snprint_chk_state (char * buff, size_t len, struct path * pp)
|
|
|
4728c8 |
{
|
|
|
4728c8 |
+ if (!pp || !pp->mpp)
|
|
|
4728c8 |
+ return snprintf(buff, len, "undef");
|
|
|
4728c8 |
+
|
|
|
4728c8 |
switch (pp->state) {
|
|
|
4728c8 |
case PATH_UP:
|
|
|
4728c8 |
return snprintf(buff, len, "ready");
|