projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20e72c2
)
hostname: make chassis type actually obtained from ACPI when nothing from DMI
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Mon, 22 Aug 2022 04:36:54 +0000
(13:36 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Mon, 22 Aug 2022 04:38:26 +0000
(13:38 +0900)
Fixes a bug introduced by
8c8b1800e90d4307397300ef32b0f6d95efad057
.
Fixes #24384.
src/hostname/hostnamed.c
patch
|
blob
|
history
diff --git
a/src/hostname/hostnamed.c
b/src/hostname/hostnamed.c
index 5f09e6d0eb5c1a03a23c1d12466d4acdad38559b..8c0b63503fa9b375f8f279f27ca22a7f45e8cea4 100644
(file)
--- 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();