diff options
author | Jan Palus <jpalus@fastmail.com> | 2021-07-08 00:23:21 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-07-08 09:27:12 +0200 |
commit | 105a4245ff13d588e1e848e8ee3cffd6185bd0ae (patch) | |
tree | 7de02fd86d4b9bd15a9a32e73137288efc08a6e1 /src/hostname | |
parent | NEWS: finalize for v249 (diff) | |
download | systemd-105a4245ff13d588e1e848e8ee3cffd6185bd0ae.tar.xz systemd-105a4245ff13d588e1e848e8ee3cffd6185bd0ae.zip |
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.
Diffstat (limited to 'src/hostname')
-rw-r--r-- | src/hostname/hostnamed.c | 8 |
1 files 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; } |