1 Star 0 Fork 91

xuxinyu / systemd

forked from src-openEuler / systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-repart-use-right-error-variable.patch 1.68 KB
一键复制 编辑 原始数据 按行查看 历史
From b57f76bff912de738a8da8feceb298160bebab26 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Tue, 5 Oct 2021 14:10:27 +0200
Subject: [PATCH] repart: use right error variable
(cherry picked from commit 8ac04a65477b59c9143b635c0c0daa5152d9b466)
Conflict:NA
Reference:https://github.com/systemd/systemd/commit/b57f76bff912de738a8da8feceb298160bebab26
---
src/partition/repart.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/partition/repart.c b/src/partition/repart.c
index 851c68cc4b..3c80d1380a 100644
--- a/src/partition/repart.c
+++ b/src/partition/repart.c
@@ -2784,7 +2784,7 @@ static int context_copy_blocks(Context *context) {
return log_error_errno(r, "Failed to copy in data from '%s': %m", p->copy_blocks_path);
if (fsync(target_fd) < 0)
- return log_error_errno(r, "Failed to synchronize copied data blocks: %m");
+ return log_error_errno(errno, "Failed to synchronize copied data blocks: %m");
if (p->encrypt != ENCRYPT_OFF) {
encrypted_dev_fd = safe_close(encrypted_dev_fd);
@@ -3060,7 +3060,7 @@ static int context_mkfs(Context *context) {
if (p->encrypt != ENCRYPT_OFF) {
if (fsync(encrypted_dev_fd) < 0)
- return log_error_errno(r, "Failed to synchronize LUKS volume: %m");
+ return log_error_errno(errno, "Failed to synchronize LUKS volume: %m");
encrypted_dev_fd = safe_close(encrypted_dev_fd);
r = deactivate_luks(cd, encrypted);
--
2.33.0
1
https://gitee.com/xuiny/systemd.git
git@gitee.com:xuiny/systemd.git
xuiny
systemd
systemd
master

搜索帮助