2012-02-03 22:31:21 +00:00
|
|
|
From febeedd8d3dbddcc6e831591b05f590eaca97b12 Mon Sep 17 00:00:00 2001
|
2011-10-31 21:56:09 +00:00
|
|
|
From: "Brian C. Lane" <bcl@redhat.com>
|
2012-02-03 22:31:21 +00:00
|
|
|
Date: Mon, 31 Oct 2011 16:35:16 -0700
|
|
|
|
Subject: [PATCH] libparted: copy flags when duplicating GPT partitions
|
2011-10-31 21:56:09 +00:00
|
|
|
|
2012-02-03 22:31:21 +00:00
|
|
|
* libparted/labels/gpt.c (gpt_partition_duplicate): Copy flags to new
|
|
|
|
partition.
|
|
|
|
* NEWS: Mention this fix.
|
|
|
|
Reported by Chris Murphy in https://bugzilla.redhat.com/747497.
|
2011-10-31 21:56:09 +00:00
|
|
|
---
|
|
|
|
NEWS | 3 +++
|
2012-02-03 22:31:21 +00:00
|
|
|
libparted/labels/gpt.c | 4 +---
|
|
|
|
2 files changed, 4 insertions(+), 3 deletions(-)
|
2011-10-31 21:56:09 +00:00
|
|
|
|
|
|
|
diff --git a/NEWS b/NEWS
|
2012-02-03 22:31:21 +00:00
|
|
|
index bc5152b..af1d957 100644
|
2011-10-31 21:56:09 +00:00
|
|
|
--- a/NEWS
|
|
|
|
+++ b/NEWS
|
|
|
|
@@ -8,6 +8,9 @@ GNU parted NEWS -*- outline -*-
|
|
|
|
|
|
|
|
** Bug fixes
|
|
|
|
|
|
|
|
+ libparted: gpt_disk_duplicate now copies the flags over to the new
|
|
|
|
+ disk object. Previously the flags would be undefined.
|
|
|
|
+
|
|
|
|
libparted: no longer aborts (failed assertion) due to a nilfs2_probe bug
|
|
|
|
[bug introduced in parted-2.4 with the addition of nilfs2 support]
|
|
|
|
|
|
|
|
diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c
|
2012-02-03 22:31:21 +00:00
|
|
|
index 8c9816f..f2bda41 100644
|
2011-10-31 21:56:09 +00:00
|
|
|
--- a/libparted/labels/gpt.c
|
|
|
|
+++ b/libparted/labels/gpt.c
|
2012-02-03 22:31:21 +00:00
|
|
|
@@ -1362,9 +1362,7 @@ gpt_partition_duplicate (const PedPartition *part)
|
|
|
|
if (!result_data)
|
|
|
|
goto error_free_part;
|
|
|
|
|
|
|
|
- result_data->type = part_data->type;
|
|
|
|
- result_data->uuid = part_data->uuid;
|
|
|
|
- strcpy (result_data->name, part_data->name);
|
|
|
|
+ *result_data = *part_data;
|
2011-10-31 21:56:09 +00:00
|
|
|
return result;
|
|
|
|
|
|
|
|
error_free_part:
|
|
|
|
--
|
2012-02-03 22:31:21 +00:00
|
|
|
1.7.6.5
|
2011-10-31 21:56:09 +00:00
|
|
|
|