5dcb73843d
- tests: test loop labels (psusi) - libparted: don't trash filesystem when writing loop label (psusi) - libparted: give correct partition device name on loop labels (psusi) - partprobe: do not skip loop labels (psusi) - libparted: don't create partition on loop label (psusi) - libparted: fix loop labels to not vanish (psusi) - libparted: remove all old partitions, even if new label allows less (psusi) - libparted: remove old partitions *first* before adding new ones (psusi) - libparted: don't detect fat and ntfs boot sectors as dos MBR (psusi) - Fix filesystem detection on non 512 byte sectors (psusi) - tests: fix t2310-dos-extended-2-sector-min-offset.sh (psusi) - libparted: remove last_usable_if_grown (psusi)
45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
From 7127a356f205af5ca97370fe6b3674f55c5ec700 Mon Sep 17 00:00:00 2001
|
|
From: Phillip Susi <psusi@ubuntu.com>
|
|
Date: Fri, 2 May 2014 21:50:48 -0400
|
|
Subject: [PATCH 205/208] partprobe: do not skip loop labels
|
|
|
|
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 77cffea..d79292f 100644
|
|
--- a/NEWS
|
|
+++ b/NEWS
|
|
@@ -25,6 +25,9 @@ GNU parted NEWS -*- outline -*-
|
|
|
|
Fix filesystem detection on non 512 byte sector sizes
|
|
|
|
+ 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.0
|
|
|