1 Star 0 Fork 98

Mingtai/systemd_1

forked from src-openEuler/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-homework-repart-turn-on-cryptsetup-logging-before-we.patch 1.50 KB
一键复制 编辑 原始数据 按行查看 历史
From 7b49704dfe47474be0d74996db45e6ba42d6b2e1 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Thu, 28 Oct 2021 19:06:52 +0200
Subject: [PATCH] homework,repart: turn on cryptsetup logging before we have a
context
Otherwise we'll miss the log message from allocation of the context. We
already made this change in most of our tools that interface with
libcryptsetup, but we forgot two.
As suggested:
https://github.com/systemd/systemd/pull/21135#discussion_r738287504
(cherry picked from commit 30f194001ff647280ad49b68597c223e57ad7f6e)
Conflict:NA
Reference:https://github.com/systemd/systemd/commit/7b49704dfe47474be0d74996db45e6ba42d6b2e1
---
src/home/homework.c | 2 ++
src/partition/repart.c | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/src/home/homework.c b/src/home/homework.c
index bdd9ac649e..b20b4bdf3e 100644
--- a/src/home/homework.c
+++ b/src/home/homework.c
@@ -1651,6 +1651,8 @@ static int run(int argc, char *argv[]) {
log_setup();
+ cryptsetup_enable_logging(NULL);
+
umask(0022);
if (argc < 2 || argc > 3)
diff --git a/src/partition/repart.c b/src/partition/repart.c
index 3c80d1380a..7602ac6aa8 100644
--- a/src/partition/repart.c
+++ b/src/partition/repart.c
@@ -4863,6 +4863,10 @@ static int run(int argc, char *argv[]) {
if (r < 0)
return r;
+#if HAVE_LIBCRYPTSETUP
+ cryptsetup_enable_logging(NULL);
+#endif
+
if (arg_image) {
assert(!arg_root);
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yangmingtaip/systemd_1.git
git@gitee.com:yangmingtaip/systemd_1.git
yangmingtaip
systemd_1
systemd_1
master

搜索帮助