mirror of
https://github.com/systemd/systemd.git
synced 2026-08-03 14:40:31 +00:00
hostname: make chassis type actually obtained from ACPI when nothing from DMI
Fixes a bug introduced by 8c8b1800e9.
Fixes #24384.
This commit is contained in:
@@ -415,7 +415,7 @@ static char* context_get_chassis(Context *c) {
|
||||
if (!isempty(c->data[PROP_CHASSIS]))
|
||||
return strdup(c->data[PROP_CHASSIS]);
|
||||
|
||||
if (get_dmi_data("ID_CHASSIS", NULL, &dmi) >= 0)
|
||||
if (get_dmi_data("ID_CHASSIS", NULL, &dmi) > 0)
|
||||
return dmi;
|
||||
|
||||
fallback = fallback_chassis();
|
||||
|
||||
Reference in New Issue
Block a user