summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Susi <psusi@ubuntu.com>2014-04-26 19:17:37 -0400
committerPhillip Susi <psusi@ubuntu.com>2014-05-22 19:56:36 -0400
commitec0b631c43ced29a05557d911bbf57110d0b7ae3 (patch)
tree0fb2993050d5d8121fc4d6f8a10e5918d879b675
parent7feb3b452c5ae57e75e16f8c00f46c9aa564a4cc (diff)
downloadparted-ec0b631c43ced29a05557d911bbf57110d0b7ae3.tar.gz
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.
-rw-r--r--NEWS3
-rw-r--r--partprobe/partprobe.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 7d7edd8..40ec2d0 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,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");