Blame SOURCES/0044-RHBZ-976688-fix-wipe-wwids.patch

f20720
---
f20720
 libmultipath/wwids.c |    6 ++++++
f20720
 1 file changed, 6 insertions(+)
f20720
f20720
Index: multipath-tools-130222/libmultipath/wwids.c
f20720
===================================================================
f20720
--- multipath-tools-130222.orig/libmultipath/wwids.c
f20720
+++ multipath-tools-130222/libmultipath/wwids.c
f20720
@@ -4,6 +4,7 @@
f20720
 #include <string.h>
f20720
 #include <limits.h>
f20720
 #include <stdio.h>
f20720
+#include <sys/types.h>
f20720
 
f20720
 #include "checkers.h"
f20720
 #include "vector.h"
f20720
@@ -100,6 +101,11 @@ replace_wwids(vector mp)
f20720
 		condlog(0, "cannot truncate wwids file : %s", strerror(errno));
f20720
 		goto out_file;
f20720
 	}
f20720
+	if (lseek(fd, 0, SEEK_SET) < 0) {
f20720
+		condlog(0, "cannot seek to the start of the file : %s",
f20720
+			strerror(errno));
f20720
+		goto out_file;
f20720
+	}
f20720
 	len = strlen(WWIDS_FILE_HEADER);
f20720
 	if (write_all(fd, WWIDS_FILE_HEADER, len) != len) {
f20720
 		condlog(0, "Can't write wwid file header : %s",