加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-homework-fix-a-bad-error-propagation.patch 1016 Bytes
一键复制 编辑 原始数据 按行查看 历史
From e05915315fdf21ee51ec1501e02d04ba1e9af045 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 24 Nov 2021 18:36:00 +0100
Subject: [PATCH] homework: fix a bad error propagation
(cherry picked from commit b05f4495bd374dc28d39ea43ac7cec3f0fea4071)
Conflict:NA
Reference:https://github.com/systemd/systemd/commit/e05915315fdf21ee51ec1501e02d04ba1e9af045
---
src/home/homework.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/home/homework.c b/src/home/homework.c
index b20b4bdf3e..32a42c5d09 100644
--- a/src/home/homework.c
+++ b/src/home/homework.c
@@ -485,7 +485,7 @@ static int write_identity_file(int root_fd, JsonVariant *v, uid_t uid) {
}
if (fchown(fileno(identity_file), uid, uid) < 0) {
- log_error_errno(r, "Failed to change ownership of identity file: %m");
+ r = log_error_errno(errno, "Failed to change ownership of identity file: %m");
goto fail;
}
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化