From c421c9282791696264d1333fb2552835140354c3 Mon Sep 17 00:00:00 2001 From: Robin H. Johnson 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 --- 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