!76 [sync] PR-72: part: Fix copy-paste bug in bd_part_spec_copy

From: @openeuler-sync-bot 
Reviewed-by: @swf504 
Signed-off-by: @swf504
This commit is contained in:
openeuler-ci-bot 2024-08-12 02:54:15 +00:00 committed by Gitee
commit f483fc8447
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From 9caf89e4449e5e4cea7f61a7377c77a69d7cad94 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Mon, 5 Aug 2024 10:03:59 +0800
Subject: [PATCH] part: Fix copy-paste bug in bd_part_spec_copy
---
src/lib/plugin_apis/part.api | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/plugin_apis/part.api b/src/lib/plugin_apis/part.api
index 41cc30c..a4e8ee4 100644
--- a/src/lib/plugin_apis/part.api
+++ b/src/lib/plugin_apis/part.api
@@ -82,7 +82,7 @@ BDPartSpec* bd_part_spec_copy (BDPartSpec *data) {
ret->path = g_strdup (data->path);
ret->name = g_strdup (data->name);
- ret->name = g_strdup (data->uuid);
+ ret->uuid = g_strdup (data->uuid);
ret->id = g_strdup (data->id);
ret->type_guid = g_strdup (data->type_guid);
ret->type = data->type;
--
2.33.0

View File

@ -3,7 +3,7 @@
Name: libblockdev
Version: 3.0.4
Release: 8
Release: 9
Summary: libblockdev is a C library supporting GObject introspection for manipulation of block devices
License: LGPLv2+
URL: https://github.com/storaged-project/libblockdev
@ -15,6 +15,7 @@ Patch3: 0003-lvm-dbus-Fix-leaking-error-in-bd_lvm_init.patch
Patch4: 0004-nvme-Fix-potential-memory-leak.patch
Patch5: 0005-part-Fix-potential-double-free-when-getting-parttype.patch
Patch6: 0006-crypto-Fix-double-free-in-bd_crypto_luks_remove_key.patch
Patch7: 0007-part-Fix-copy-paste-bug-in-bd_part_spec_copy.patch
BuildRequires: make glib2-devel libyaml-devel libbytesize-devel parted-devel libuuid-devel ndctl-devel device-mapper-devel
BuildRequires: device-mapper-devel systemd-devel nss-devel volume_key-devel >= 0.3.9-7 libblkid-devel libmount-devel
@ -164,6 +165,12 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm}
%changelog
* Mon Aug 5 2024 cenhuilin <cenhuilin@kylinos.cn> - 3.0.4-9
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:part: Fix copy-paste bug in bd_part_spec_copy
* Mon Jul 22 2024 kouwenqi <kouwenqi@kylinos.cn> - 3.0.4-8
- Type:bugfix
- ID:NA