X Tutup
Skip to content

Commit 105a424

Browse files
jpaluspoettering
authored andcommitted
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.
1 parent f627855 commit 105a424

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/hostname/hostnamed.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,14 @@ static const char* fallback_chassis(void) {
204204

205205
r = read_one_line_file("/sys/class/dmi/id/chassis_type", &type);
206206
if (r < 0) {
207-
log_debug_errno(v, "Failed to read DMI chassis type, ignoring: %m");
207+
log_debug_errno(r, "Failed to read DMI chassis type, ignoring: %m");
208208
goto try_acpi;
209209
}
210210

211211
r = safe_atou(type, &t);
212212
free(type);
213213
if (r < 0) {
214-
log_debug_errno(v, "Failed to parse DMI chassis type, ignoring: %m");
214+
log_debug_errno(r, "Failed to parse DMI chassis type, ignoring: %m");
215215
goto try_acpi;
216216
}
217217

@@ -260,14 +260,14 @@ static const char* fallback_chassis(void) {
260260
try_acpi:
261261
r = read_one_line_file("/sys/firmware/acpi/pm_profile", &type);
262262
if (r < 0) {
263-
log_debug_errno(v, "Failed read ACPI PM profile, ignoring: %m");
263+
log_debug_errno(r, "Failed read ACPI PM profile, ignoring: %m");
264264
return NULL;
265265
}
266266

267267
r = safe_atou(type, &t);
268268
free(type);
269269
if (r < 0) {
270-
log_debug_errno(v, "Failed parse ACPI PM profile, ignoring: %m");
270+
log_debug_errno(r, "Failed parse ACPI PM profile, ignoring: %m");
271271
return NULL;
272272
}
273273

0 commit comments

Comments
 (0)
X Tutup