1 Star 0 Fork 19

张洪涛/libblockdev

forked from src-openEuler/libblockdev 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0008-dm-Fix-comparing-DM-RAID-member-devices-UUID.patch 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
Wenchao Hao 提交于 2021-11-17 22:43 . update to libblockdev-2.26-1
From 332c90019613797a2a634020f288a81a09b8b985 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Tue, 18 Aug 2020 09:44:29 +0200
Subject: [PATCH 09/15] dm: Fix comparing DM RAID member devices UUID
There is no "UUID" property in UDev we must use the "ID_FS_UUID"
one.
This comparison works only because most DM RAID members don't have
UUID so the check is skipped, but it fails for DDF RAID members
which have a special GUID/UUID in UDev database.
---
src/plugins/dm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/dm.c b/src/plugins/dm.c
index fb4e50b..93a47f4 100644
--- a/src/plugins/dm.c
+++ b/src/plugins/dm.c
@@ -481,7 +481,7 @@ static gboolean raid_dev_matches_spec (struct raid_dev *raid_dev, const gchar *n
context = udev_new ();
device = udev_device_new_from_subsystem_sysname (context, "block", dev_name);
- dev_uuid = udev_device_get_property_value (device, "UUID");
+ dev_uuid = udev_device_get_property_value (device, "ID_FS_UUID");
major_str = udev_device_get_property_value (device, "MAJOR");
minor_str = udev_device_get_property_value (device, "MINOR");
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Zht-Try/libblockdev.git
git@gitee.com:Zht-Try/libblockdev.git
Zht-Try
libblockdev
libblockdev
master

搜索帮助