]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/hostname/hostnamed.c
hostnamed: add support for getting the chassis type from device-tree 20731/head
authorArnaud Ferraris <arnaud.ferraris@collabora.com>
Tue, 14 Sep 2021 13:40:42 +0000 (15:40 +0200)
committerArnaud Ferraris <arnaud.ferraris@collabora.com>
Wed, 15 Sep 2021 14:46:07 +0000 (16:46 +0200)
commite6e6ca82515d69c58f4940ec8189f78bb5880eb2
treebe51c4f506805b96e759a19d69211129ec0603cf
parent533f11c5292ff68aaaaf08cff3570140bb6d1f1b
hostnamed: add support for getting the chassis type from device-tree

Device-tree based devices can't get the chassis type from DMI or ACPI,
and so far need a custom `/etc/machine-info` to set this property right.

A new 'chassis-type' toplevel device tree property has recently been
approved into the DT specification, making it possible to automate
chassis type detection on such devices.

This patch therefore falls back to reading this device-tree property if
nothing is available through both DMI and ACPI.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
src/hostname/hostnamed.c