代码拉取完成,页面将自动刷新
同步操作将从 yangshicheng/systemd 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From b873f52871845b769f739e9d6954080ba490200c Mon Sep 17 00:00:00 2001
From: Jan Palus <jpalus@fastmail.com>
Date: Thu, 8 Jul 2021 00:23:21 +0200
Subject: [PATCH] hostnamed: correct variable with errno in fallback_chassis
fixes assertion failure on arm:
systemd-hostnamed[642]: Assertion '(_error) != 0' failed at src/hostname/hostnamed.c:207, function fallback_chassis(). Aborting.
(cherry picked from commit 105a4245ff13d588e1e848e8ee3cffd6185bd0ae)
(cherry picked from commit 4a44597bdd725f504ebd520b0deef7797dc46daa)
Conflict:NA
Reference:https://github.com/systemd/systemd/commit/b873f52871845b769f739e9d6954080ba490200c
---
src/hostname/hostnamed.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index bd535ddc4d..36702f2fb0 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -204,14 +204,14 @@ static const char* fallback_chassis(void) {
r = read_one_line_file("/sys/class/dmi/id/chassis_type", &type);
if (r < 0) {
- log_debug_errno(v, "Failed to read DMI chassis type, ignoring: %m");
+ log_debug_errno(r, "Failed to read DMI chassis type, ignoring: %m");
goto try_acpi;
}
r = safe_atou(type, &t);
free(type);
if (r < 0) {
- log_debug_errno(v, "Failed to parse DMI chassis type, ignoring: %m");
+ log_debug_errno(r, "Failed to parse DMI chassis type, ignoring: %m");
goto try_acpi;
}
@@ -260,14 +260,14 @@ static const char* fallback_chassis(void) {
try_acpi:
r = read_one_line_file("/sys/firmware/acpi/pm_profile", &type);
if (r < 0) {
- log_debug_errno(v, "Failed read ACPI PM profile, ignoring: %m");
+ log_debug_errno(r, "Failed read ACPI PM profile, ignoring: %m");
return NULL;
}
r = safe_atou(type, &t);
free(type);
if (r < 0) {
- log_debug_errno(v, "Failed parse ACPI PM profile, ignoring: %m");
+ log_debug_errno(r, "Failed parse ACPI PM profile, ignoring: %m");
return NULL;
}
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。