[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16231: [PATCH 6/9] partprobe: do not skip loop labels
From: |
Phillip Susi |
Subject: |
bug#16231: [PATCH 6/9] partprobe: do not skip loop labels |
Date: |
Fri, 2 May 2014 21:50:48 -0400 |
Partprobe was not syncing loop labels. This resulted it failing to remove
existing partitions when switching to a loop label.
---
NEWS | 3 +++
partprobe/partprobe.c | 4 +---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/NEWS b/NEWS
index 385a120..f99c6fe 100644
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,9 @@ GNU parted NEWS -*-
outline -*-
** Bug Fixes
+ partprobe: when called on a disk that has become a loop label,
+ remove any partitions left over from a previous label.
+
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.
diff --git a/partprobe/partprobe.c b/partprobe/partprobe.c
index 4da4fb7..8b744b5 100644
--- a/partprobe/partprobe.c
+++ b/partprobe/partprobe.c
@@ -106,9 +106,7 @@ process_dev (PedDevice* dev)
PedDisk* disk;
disk_type = ped_disk_probe (dev);
- if (disk_type && !strcmp (disk_type->name, "loop"))
- return 1;
- else if (!disk_type) {
+ if (!disk_type) {
/* Partition table not found, so create dummy,
empty one */
disk_type = ped_disk_type_get("msdos");
--
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 <=
- 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, 2014/05/02
- 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