[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16231: [PATCH 5/9] libparted: don't create partition on loop label
From: |
Phillip Susi |
Subject: |
bug#16231: [PATCH 5/9] libparted: don't create partition on loop label |
Date: |
Fri, 2 May 2014 21:50:47 -0400 |
The loop label represents an unpartitioned disk, but creates
a dummy partition to represent the whole disk. This dummy partition
was actually being loaded into the kernel. Don't do that.
---
NEWS | 4 ++++
libparted/arch/linux.c | 3 +++
2 files changed, 7 insertions(+)
diff --git a/NEWS b/NEWS
index 36536e2..385a120 100644
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,10 @@ GNU parted NEWS -*-
outline -*-
** Bug Fixes
+ libparted: The loop label represents an unpartitioned disk, but creates
+ a dummy partition to represent the whole disk. This dummy partition
+ was actually being loaded into the kernel. Don't do that.
+
libparted: fix loop labels to not vanish if you don't create
a filesystem, and to not return an error syncing when you do.
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 4cbe49b..9ae6d64 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2883,6 +2883,9 @@ _disk_sync_part_table (PedDisk* disk)
lpn = PED_MIN(lpn, part_range);
else
lpn = part_range;
+ /* don't actually add partitions for loop */
+ if (strcmp (disk->type->name, "loop") == 0)
+ lpn = 0;
for (i = 1; i <= lpn; i++) {
PedPartition *part = ped_disk_get_partition (disk, i);
if (!part)
--
1.9.1
- bug#16231: [PATCH 0/9] Refactored loop fixes, Phillip Susi, 2014/05/02
- bug#16231: [PATCH 2/9] libparted: remove old partitions *first* before adding new ones, Phillip Susi, 2014/05/02
- bug#16231: [PATCH 9/9] tests: test loop labels, Phillip Susi, 2014/05/02
- bug#16231: [PATCH 3/9] libparted: remove all old partitions, even if new label allows less, Phillip Susi, 2014/05/02
- bug#16231: [PATCH 1/9] libparted: don't detect fat and ntfs boot sectors as dos MBR, Phillip Susi, 2014/05/02
- bug#16231: [PATCH 6/9] partprobe: do not skip loop labels, Phillip Susi, 2014/05/02
- bug#16231: [PATCH 7/9] libparted: give correct partition device name on loop labels, Phillip Susi, 2014/05/02
- bug#16231: [PATCH 5/9] libparted: don't create partition on loop label,
Phillip Susi <=
- bug#16231: [PATCH 8/9] libparted: don't trash filesystem when writing loop label, Phillip Susi, 2014/05/02
- bug#16231: [PATCH 4/9] libparted: fix loop labels to not vanish, Phillip Susi, 2014/05/02
- bug#16231: [PATCH 0/9] Refactored loop fixes, Brian C. Lane, 2014/05/07
- bug#16231: [PATCH 0/9] Refactored loop fixes, Phillip Susi, 2014/05/07
- bug#16231: [PATCH 0/9] Refactored loop fixes, Brian C. Lane, 2014/05/08
- bug#16231: [PATCH 0/9] Refactored loop fixes, Phillip Susi, 2014/05/19
- bug#16231: [PATCH 0/9] Refactored loop fixes, Brian C. Lane, 2014/05/21
- bug#16231: [PATCH 0/9] Refactored loop fixes, Phillip Susi, 2014/05/22
- bug#16231: [PATCH 0/9] Refactored loop fixes, Brian C. Lane, 2014/05/22
- bug#16231: [PATCH 0/9] Refactored loop fixes, Phillip Susi, 2014/05/22