1 Star 0 Fork 101

chenjiayi/systemd

forked from src-openEuler/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-udev-update-log-message-to-clarify-that-the-error-is-ignored.patch 1.56 KB
一键复制 编辑 原始数据 按行查看 历史
From 6be97d67c82ef5f45360c4323616739816b8f833 Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Wed, 16 Jun 2021 21:02:01 +0900
Subject: [PATCH] udev: update log message to clarify that the error is ignored
Reference:https://github.com/systemd/systemd/commit/6be97d67c82ef5f45360c4323616739816b8f833
Conflict:NA
---
src/udev/udevd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 546bfe039e1d..34a5c9d5d8ee 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -171,8 +171,8 @@ static void event_free(Event *event) {
/* only clean up the queue from the process that created it */
if (LIST_IS_EMPTY(event->manager->events) &&
event->manager->pid == getpid_cached())
- if (unlink("/run/udev/queue") < 0)
- log_warning_errno(errno, "Failed to unlink /run/udev/queue: %m");
+ if (unlink("/run/udev/queue") < 0 && errno != ENOENT)
+ log_warning_errno(errno, "Failed to unlink /run/udev/queue, ignoring: %m");
free(event);
}
@@ -965,7 +965,7 @@ static int event_queue_insert(Manager *manager, sd_device *dev) {
if (LIST_IS_EMPTY(manager->events)) {
r = touch("/run/udev/queue");
if (r < 0)
- log_warning_errno(r, "Failed to touch /run/udev/queue: %m");
+ log_warning_errno(r, "Failed to touch /run/udev/queue, ignoring: %m");
}
LIST_APPEND(event, manager->events, event);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jiayi0118/systemd.git
git@gitee.com:jiayi0118/systemd.git
jiayi0118
systemd
systemd
master

搜索帮助

371d5123 14472233 46e8bd33 14472233