1
0
multipath-tools/multipath-tools-allow-zero-paths

39 lines
935 B
Plaintext
Raw Normal View History

From 6ebe82d29b759049d1df1cb689f9c35bdaf58808 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Thu, 20 Nov 2008 13:33:10 +0100
Subject: [PATCH] Allow zero paths for device-mapper strings
There is no reason why we shouldn't allow zero paths in the device
mapper output.
References: 435688
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
libmultipath/dmparser.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/libmultipath/dmparser.c b/libmultipath/dmparser.c
index 9441b11..0cef666 100644
--- a/libmultipath/dmparser.c
+++ b/libmultipath/dmparser.c
@@ -187,11 +187,12 @@ disassemble_map (vector pathvec, char * params, struct multipath * mpp)
num_pg = atoi(word);
FREE(word);
- if (num_pg > 0 && !mpp->pg)
+ if (num_pg > 0 && !mpp->pg) {
mpp->pg = vector_alloc();
- if (!mpp->pg)
- return 1;
+ if (!mpp->pg)
+ return 1;
+ }
/*
* first pg to try
--
1.5.3.2