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