diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-08-22 13:36:54 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-08-22 13:38:26 +0900 |
commit | 471fdebfdea843648acb5abeacf5ae559c3ad77a (patch) | |
tree | 3c57037813b5cdda3ac67c261780522470a12256 /src/hostname | |
parent | 20e72c2bd42ddd2f39f3f4ac2384c4fecd4ff444 (diff) | |
download | systemd-471fdebfdea843648acb5abeacf5ae559c3ad77a.tar.gz |
hostname: make chassis type actually obtained from ACPI when nothing from DMI
Fixes a bug introduced by 8c8b1800e90d4307397300ef32b0f6d95efad057.
Fixes #24384.
Diffstat (limited to 'src/hostname')
-rw-r--r-- | src/hostname/hostnamed.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index 5f09e6d0eb..8c0b63503f 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -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(); |