]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/blame - multipath-tools/patches/0004-RH-fix-kpartx.patch
Move all packages to root.
[people/pmueller/ipfire-3.x.git] / multipath-tools / patches / 0004-RH-fix-kpartx.patch
CommitLineData
dc01aad8
SS
1From 8d443fe2c58e22166426438e6f6d5757934f7b31 Mon Sep 17 00:00:00 2001
2From: Fabio M. Di Nitto <fdinitto@redhat.com>
3Date: Tue, 13 Oct 2009 08:23:42 +0200
4Subject: [PATCH 04/12] RH: fix kpartx
5
6Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
7---
8:100644 100644 b61a81f... 103ed0a... M kpartx/kpartx.c
9 kpartx/kpartx.c | 6 ++++--
10 1 files changed, 4 insertions(+), 2 deletions(-)
11
12diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
13index b61a81f..103ed0a 100644
14--- a/kpartx/kpartx.c
15+++ b/kpartx/kpartx.c
16@@ -488,6 +488,7 @@ main(int argc, char **argv){
17 d = c;
18 while (c) {
19 for (j = 0; j < n; j++) {
20+ uint64_t start;
21 int k = slices[j].container - 1;
22
23 if (slices[j].size == 0)
24@@ -498,7 +499,7 @@ main(int argc, char **argv){
25 continue;
26
27 /* Skip all simple slices */
28- if (k < 0)
29+ if (slices[j].container == 0)
30 continue;
31
32 /* Check container slice */
33@@ -513,10 +514,11 @@ main(int argc, char **argv){
34 }
35 strip_slash(partname);
36
37+ start = slices[j].start - slices[k].start;
38 if (safe_sprintf(params, "%d:%d %" PRIu64,
39 slices[k].major,
40 slices[k].minor,
41- slices[j].start)) {
42+ start)) {
43 fprintf(stderr, "params too small\n");
44 exit(1);
45 }
46--
471.6.5.1
48