Blame SOURCES/0218-RHBZ-1459370-add-feature-fix.patch

04f29f
---
04f29f
 libmultipath/structs.c |   10 ++++++++++
04f29f
 1 file changed, 10 insertions(+)
04f29f
04f29f
Index: multipath-tools-130222/libmultipath/structs.c
04f29f
===================================================================
04f29f
--- multipath-tools-130222.orig/libmultipath/structs.c
04f29f
+++ multipath-tools-130222/libmultipath/structs.c
04f29f
@@ -511,6 +511,16 @@ add_feature (char **f, char *n)
04f29f
 	if (!n || *n == '0')
04f29f
 		return 0;
04f29f
 
04f29f
+	/* default feature is null */
04f29f
+	if (!*f)
04f29f
+	{
04f29f
+		l = asprintf(&t, "1 %s", n);
04f29f
+		if (l == -1)
04f29f
+			return 1;
04f29f
+		*f = t;
04f29f
+		return 0;
04f29f
+	}
04f29f
+
04f29f
 	/* Check if feature is already present */
04f29f
 	if (strstr(*f, n))
04f29f
 		return 0;