You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
615 B
25 lines
615 B
--- |
|
libmultipath/structs.c | 10 ++++++++++ |
|
1 file changed, 10 insertions(+) |
|
|
|
Index: multipath-tools-130222/libmultipath/structs.c |
|
=================================================================== |
|
--- multipath-tools-130222.orig/libmultipath/structs.c |
|
+++ multipath-tools-130222/libmultipath/structs.c |
|
@@ -511,6 +511,16 @@ add_feature (char **f, char *n) |
|
if (!n || *n == '0') |
|
return 0; |
|
|
|
+ /* default feature is null */ |
|
+ if (!*f) |
|
+ { |
|
+ l = asprintf(&t, "1 %s", n); |
|
+ if (l == -1) |
|
+ return 1; |
|
+ *f = t; |
|
+ return 0; |
|
+ } |
|
+ |
|
/* Check if feature is already present */ |
|
if (strstr(*f, n)) |
|
return 0;
|
|
|