mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-08 20:58:20 +03:00
hostname: make chassis type actually obtained from ACPI when nothing from DMI
Fixes a bug introduced by 8c8b1800e90d4307397300ef32b0f6d95efad057. Fixes #24384. (cherry picked from commit 471fdebfdea843648acb5abeacf5ae559c3ad77a)
This commit is contained in:
parent
4ffde70981
commit
58bc1e8e04
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user