summaryrefslogtreecommitdiffstats
path: root/fix_kpartx.patch
diff options
context:
space:
mode:
authorMilan Broz <mbroz@fedoraproject.org>2009-03-06 12:53:14 +0000
committerMilan Broz <mbroz@fedoraproject.org>2009-03-06 12:53:14 +0000
commit8f7403ae6dcd2e4ae73d86c2f4e82824213ccc9c (patch)
treec860a701b6042aca32d6bba4b39c9788c3ed2ded /fix_kpartx.patch
parentc0d4270bc6a82598217753f75398bf1f972dc716 (diff)
Fix kpartx extended partition handling. Resolves: #475283device-mapper-multipath-0_4_8-9_fc11
Diffstat (limited to 'fix_kpartx.patch')
-rw-r--r--fix_kpartx.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/fix_kpartx.patch b/fix_kpartx.patch
new file mode 100644
index 0000000..8d12bc3
--- /dev/null
+++ b/fix_kpartx.patch
@@ -0,0 +1,32 @@
+--- multipath-tools.old/kpartx/kpartx.c 2008-07-23 22:49:52.000000000 +0200
++++ multipath-tools/kpartx/kpartx.c 2009-03-06 13:32:49.000000000 +0100
+@@ -474,6 +474,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)
+@@ -484,7 +485,7 @@ main(int argc, char **argv){
+ continue;
+
+ /* Skip all simple slices */
+- if (k < 0)
++ if (slices[j].container == 0)
+ continue;
+
+ /* Check container slice */
+@@ -499,10 +500,11 @@ main(int argc, char **argv){
+ }
+ 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);
+ }