parted/parted-1.9.0-handle-dup-error.patch

29 lines
929 B
Diff
Raw Normal View History

2009-07-29 08:02:49 +00:00
From 4f14bec7eb887aba8b8e38b987bc01e8456a79fc Mon Sep 17 00:00:00 2001
2009-07-22 10:18:08 +00:00
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.
---
2009-07-29 08:02:49 +00:00
libparted/disk.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
2009-07-22 10:18:08 +00:00
diff --git a/libparted/disk.c b/libparted/disk.c
2009-07-29 08:02:49 +00:00
index 3656d22..27611eb 100644
2009-07-22 10:18:08 +00:00
--- a/libparted/disk.c
+++ b/libparted/disk.c
2009-07-29 08:02:49 +00:00
@@ -277,8 +277,10 @@ ped_disk_duplicate (const PedDisk* old_disk)
for (old_part = ped_disk_next_partition (old_disk, NULL); old_part;
2009-07-22 10:18:08 +00:00
old_part = ped_disk_next_partition (old_disk, old_part)) {
if (ped_partition_is_active (old_part)) {
2009-07-29 08:02:49 +00:00
- if (!_add_duplicate_part (new_disk, old_part))
+ if (!_add_duplicate_part (new_disk, old_part)){
2009-07-22 10:18:08 +00:00
+ _disk_pop_update_mode (new_disk);
goto error_destroy_new_disk;
2009-07-29 08:02:49 +00:00
+ }
2009-07-22 10:18:08 +00:00
}
}
2009-07-29 08:02:49 +00:00
if (!_disk_pop_update_mode (new_disk))
2009-07-22 10:18:08 +00:00
--
1.6.0.6