34 lines
1013 B
Diff
34 lines
1013 B
Diff
From 06241515a818dcf62e7c5728a8328cf165e3a793 Mon Sep 17 00:00:00 2001
|
|
From: "Brian C. Lane" <bcl@redhat.com>
|
|
Date: Wed, 11 Jun 2014 12:13:48 -0700
|
|
Subject: [PATCH 123/134] libparted: Fix part dupe with empty name
|
|
|
|
It was setting the original translated_name to 0, not the new copy.
|
|
|
|
* libparted/labels/gpt.c (gpt_partition_duplicate): fix empty name
|
|
---
|
|
libparted/labels/gpt.c | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c
|
|
index 2a08a50..d69377a 100644
|
|
--- a/libparted/labels/gpt.c
|
|
+++ b/libparted/labels/gpt.c
|
|
@@ -1407,9 +1407,11 @@ gpt_partition_duplicate (const PedPartition *part)
|
|
goto error_free_part;
|
|
|
|
*result_data = *part_data;
|
|
- if (part_data->translated_name)
|
|
+ if (part_data->translated_name) {
|
|
result_data->translated_name = xstrdup (part_data->translated_name);
|
|
- else part_data->translated_name = 0;
|
|
+ } else {
|
|
+ result_data->translated_name = 0;
|
|
+ }
|
|
return result;
|
|
|
|
error_free_part:
|
|
--
|
|
1.9.3
|
|
|