671555
---
671555
 kpartx/dos.c    |    2 --
671555
 kpartx/kpartx.c |    9 ++++++---
671555
 2 files changed, 6 insertions(+), 5 deletions(-)
671555
671555
Index: multipath-tools-130222/kpartx/dos.c
671555
===================================================================
671555
--- multipath-tools-130222.orig/kpartx/dos.c
671555
+++ multipath-tools-130222/kpartx/dos.c
671555
@@ -98,8 +98,6 @@ read_dos_pt(int fd, struct slice all, st
671555
 			break;
671555
 		}
671555
 		if (is_extended(p.sys_type)) {
671555
-			sp[i].size = 2; /* extended partitions only get two
671555
-					   sectors mapped for LILO to install */
671555
 			n += read_extended_partition(fd, &p, i, sp+n, ns-n);
671555
 		}
671555
 	}
671555
Index: multipath-tools-130222/kpartx/kpartx.c
671555
===================================================================
671555
--- multipath-tools-130222.orig/kpartx/kpartx.c
671555
+++ multipath-tools-130222/kpartx/kpartx.c
671555
@@ -516,6 +516,7 @@ main(int argc, char **argv){
671555
 			d = c;
671555
 			while (c) {
671555
 				for (j = 0; j < n; j++) {
671555
+					uint64_t start;
671555
 					int k = slices[j].container - 1;
671555
 
671555
 					if (slices[j].size == 0)
671555
@@ -541,9 +542,11 @@ main(int argc, char **argv){
671555
 					}
671555
 					strip_slash(partname);
671555
 
671555
-					if (safe_sprintf(params, "%s %" PRIu64,
671555
-							 device,
671555
-							 slices[j].start)) {
671555
+					start = slices[j].start - slices[k].start;
671555
+					if (safe_sprintf(params, "%d:%d %" PRIu64,
671555
+							 slices[k].major,
671555
+							 slices[k].minor,
671555
+							 start)) {
671555
 						fprintf(stderr, "params too small\n");
671555
 						exit(1);
671555
 					}