c4a50494de
- Copy pmbr_boot flag in gpt_duplicate
47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
From febeedd8d3dbddcc6e831591b05f590eaca97b12 Mon Sep 17 00:00:00 2001
|
|
From: "Brian C. Lane" <bcl@redhat.com>
|
|
Date: Mon, 31 Oct 2011 16:35:16 -0700
|
|
Subject: [PATCH] libparted: copy flags when duplicating GPT partitions
|
|
|
|
* 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.
|
|
---
|
|
NEWS | 3 +++
|
|
libparted/labels/gpt.c | 4 +---
|
|
2 files changed, 4 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/NEWS b/NEWS
|
|
index bc5152b..af1d957 100644
|
|
--- 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
|
|
index 8c9816f..f2bda41 100644
|
|
--- a/libparted/labels/gpt.c
|
|
+++ b/libparted/labels/gpt.c
|
|
@@ -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;
|
|
return result;
|
|
|
|
error_free_part:
|
|
--
|
|
1.7.6.5
|
|
|