2009-07-29 22:54:07 +00:00
|
|
|
Index: multipath-tools-090724/kpartx/kpartx.c
|
|
|
|
===================================================================
|
|
|
|
--- multipath-tools-090724.orig/kpartx/kpartx.c
|
|
|
|
+++ multipath-tools-090724/kpartx/kpartx.c
|
|
|
|
@@ -489,6 +489,7 @@ main(int argc, char **argv){
|
2009-03-06 12:53:14 +00:00
|
|
|
d = c;
|
|
|
|
while (c) {
|
|
|
|
for (j = 0; j < n; j++) {
|
|
|
|
+ uint64_t start;
|
|
|
|
int k = slices[j].container - 1;
|
|
|
|
|
|
|
|
if (slices[j].size == 0)
|
2009-07-29 22:54:07 +00:00
|
|
|
@@ -499,7 +500,7 @@ main(int argc, char **argv){
|
2009-03-06 12:53:14 +00:00
|
|
|
continue;
|
|
|
|
|
|
|
|
/* Skip all simple slices */
|
|
|
|
- if (k < 0)
|
|
|
|
+ if (slices[j].container == 0)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
/* Check container slice */
|
2009-07-29 22:54:07 +00:00
|
|
|
@@ -514,10 +515,11 @@ main(int argc, char **argv){
|
2009-03-06 12:53:14 +00:00
|
|
|
}
|
|
|
|
strip_slash(partname);
|
|
|
|
|
|
|
|
+ start = slices[j].start - slices[k].start;
|
|
|
|
if (safe_sprintf(params, "%d:%d %" PRIu64,
|
|
|
|
slices[k].major,
|
|
|
|
slices[k].minor,
|
|
|
|
- slices[j].start)) {
|
|
|
|
+ start)) {
|
|
|
|
fprintf(stderr, "params too small\n");
|
|
|
|
exit(1);
|
|
|
|
}
|