summaryrefslogtreecommitdiff
blob: 3f70fd70e4c3cc445499912bd51764d32d283a46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From c421c9282791696264d1333fb2552835140354c3 Mon Sep 17 00:00:00 2001
From: Robin H. Johnson <robbat2@gentoo.org>
Date: Thu, 5 Nov 2009 03:44:12 +0000
Subject: [PATCH] kpartx: Fix broken calculation of extended partitions that caused random devices to be used instead of the correct parent device.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
---
 kpartx/dos.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/kpartx/dos.c b/kpartx/dos.c
index 1691105..317fc56 100644
--- a/kpartx/dos.c
+++ b/kpartx/dos.c
@@ -53,7 +53,9 @@ read_extended_partition(int fd, struct partition *ep, int en,
 			if (n < ns) {
 				sp[n].start = here + le32_to_cpu(p.start_sect);
 				sp[n].size = le32_to_cpu(p.nr_sects);
-				sp[n].container = en + 1;
+                                // This line seems to have no understandable
+                                // purpose, and causes the wrong device to be used
+                                //sp[n].container = en + 1;
 				n++;
 			} else {
 				fprintf(stderr,
-- 
1.6.4