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