[dm-devel] [PATCH 13/78] Do not print empty device strings during discovery
Hannes Reinecke
hare at suse.de
Mon Mar 16 12:36:00 UTC 2015
If the path provides no information we should not print out
empty strings, but rather an instructive message telling us so.
References: bnc#872712
Signed-off-by: Hannes Reinecke <hare at suse.de>
---
libmultipath/structs_vec.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index a15e3c0..a1f2212 100644
--- a/libmultipath/structs_vec.c
+++ b/libmultipath/structs_vec.c
@@ -226,6 +226,12 @@ extract_hwe_from_path(struct multipath * mpp)
}
if (pp) {
+ if (!strlen(pp->vendor_id) ||
+ !strlen(pp->product_id) ||
+ !strlen(pp->rev)) {
+ condlog(3, "%s: no device details available", pp->dev);
+ return NULL;
+ }
condlog(3, "%s: vendor = %s", pp->dev, pp->vendor_id);
condlog(3, "%s: product = %s", pp->dev, pp->product_id);
condlog(3, "%s: rev = %s", pp->dev, pp->rev);
--
1.8.4.5
More information about the dm-devel
mailing list