29 lines
929 B
Diff
29 lines
929 B
Diff
From 4f14bec7eb887aba8b8e38b987bc01e8456a79fc Mon Sep 17 00:00:00 2001
|
|
From: Joel Granados Moreno <jgranado@redhat.com>
|
|
Date: Wed, 22 Jul 2009 12:08:34 +0200
|
|
Subject: [PATCH] Try to handle the duplicate error a little better.
|
|
|
|
---
|
|
libparted/disk.c | 4 +++-
|
|
1 files changed, 3 insertions(+), 1 deletions(-)
|
|
|
|
diff --git a/libparted/disk.c b/libparted/disk.c
|
|
index 3656d22..27611eb 100644
|
|
--- a/libparted/disk.c
|
|
+++ b/libparted/disk.c
|
|
@@ -277,8 +277,10 @@ ped_disk_duplicate (const PedDisk* old_disk)
|
|
for (old_part = ped_disk_next_partition (old_disk, NULL); old_part;
|
|
old_part = ped_disk_next_partition (old_disk, old_part)) {
|
|
if (ped_partition_is_active (old_part)) {
|
|
- if (!_add_duplicate_part (new_disk, old_part))
|
|
+ if (!_add_duplicate_part (new_disk, old_part)){
|
|
+ _disk_pop_update_mode (new_disk);
|
|
goto error_destroy_new_disk;
|
|
+ }
|
|
}
|
|
}
|
|
if (!_disk_pop_update_mode (new_disk))
|
|
--
|
|
1.6.0.6
|
|
|