1 Star 0 Fork 40

東東/lvm2

forked from src-openEuler/lvm2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0008-enhancement-syslog-more-when-use-libdevmapper-so.patch 1.47 KB
一键复制 编辑 原始数据 按行查看 历史
wguanghao 提交于 2022-09-16 14:56 . upgrade version to 2.03.16
From 53db5959233fb8977ff6c9cc0fc743239704f7e9 Mon Sep 17 00:00:00 2001
From: wangjufeng <wangjufeng@huawei.com>
Date: Sat, 16 Nov 2019 15:09:56 +0800
Subject: [PATCH] syslog more when use libdevmapper.so
When docker use function of libdevmapper.so, it don't log to syslog.
This patch make it also log to syslog.
Signed-off-by: wangjufeng<wangjufeng@huawei.com>
---
libdm/libdm-common.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c
index 0b03106..2fd8783 100644
--- a/libdm/libdm-common.c
+++ b/libdm/libdm-common.c
@@ -132,6 +132,7 @@ static void _default_log_line(int level, const char *file,
fprintf(out, "%s:%d ", file, line);
vfprintf(out, f, ap);
+ vsyslog(level, f, ap);
fputc('\n', out);
}
@@ -2586,11 +2587,15 @@ int dm_udev_complete(uint32_t cookie)
{
int semid;
- if (!cookie || !dm_udev_get_sync_support())
+ if (!cookie || !dm_udev_get_sync_support()) {
+ log_print("Do not wait cookie:0x%x", cookie);
return 1;
+ }
- if (!_get_cookie_sem(cookie, &semid))
+ if (!_get_cookie_sem(cookie, &semid)) {
+ log_error("Could not get cookie 0x%x sem %d", cookie, semid);
return_0;
+ }
if (!_udev_notify_sem_dec(cookie, semid)) {
log_error("Could not signal waiting process using notification "
@@ -2598,7 +2603,7 @@ int dm_udev_complete(uint32_t cookie)
cookie, cookie);
return 0;
}
-
+ log_print("Complete cookie 0x%x success.", cookie);
return 1;
}
--
2.19.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/East_x/lvm2.git
git@gitee.com:East_x/lvm2.git
East_x
lvm2
lvm2
master

搜索帮助