加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-core-device-drop-unnecessary-condition.patch 844 Bytes
一键复制 编辑 原始数据 按行查看 历史
hongjinghao 提交于 2023-06-19 10:57 . sync patches from systemd community
From f33bc87989a87475ed41bc9cd715c4cbb18ee389 Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Sun, 1 May 2022 21:42:43 +0900
Subject: [PATCH] core/device: drop unnecessary condition
---
src/core/device.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/core/device.c b/src/core/device.c
index 44425cda3c..934676287e 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -179,10 +179,7 @@ static void device_catchup(Unit *u) {
assert(d);
- /* Second, let's update the state with the enumerated state if it's different */
- if (d->enumerated_found == d->found)
- return;
-
+ /* Second, let's update the state with the enumerated state */
device_update_found_one(d, d->enumerated_found, DEVICE_FOUND_MASK);
}
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化