[PATCH 17/18] Fix sun partition numbering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun labeled devices, the kpartx partition numbers weren't agreeing
with the underlying device partition numbers.  This is because kpartx
doesn't count slices with no sectors, when determining the numbering.
This patch counts these empty slices, so the numbering comes out the
same.

Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>
---
 kpartx/sun.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kpartx/sun.c b/kpartx/sun.c
index 3d88b21..b8c023b 100644
--- a/kpartx/sun.c
+++ b/kpartx/sun.c
@@ -82,8 +82,6 @@ read_sun_pt(int fd, struct slice all, struct slice *sp, int ns) {
 	for(i=0, n=0; i<SUN_DISK_MAXPARTITIONS; i++) {
 		s = &l->partitions[i];
 
-		if (s->num_sectors == 0)
-			continue;
 		if (n < ns) {
 			sp[n].start = offset +
 				be32_to_cpu(s->start_cylinder) * be16_to_cpu(l->nsect) * be16_to_cpu(l->ntrks);
-- 
1.8.3.1

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux