summaryrefslogtreecommitdiff
path: root/src/hostname
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-03-14 11:52:30 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2022-03-14 18:44:09 +0000
commit67840dbf37ebdfcb9573a54c2b54b93c70300c4d (patch)
tree349880f75ad76ae9cdbb1dd9c5a6c9038084a7e1 /src/hostname
parent40f55f699811285d947dd02e8a5ae906a40f1290 (diff)
downloadsystemd-67840dbf37ebdfcb9573a54c2b54b93c70300c4d.tar.gz
hostnamed: update chassis table to SMBIOS 3.5
Diffstat (limited to 'src/hostname')
-rw-r--r--src/hostname/hostnamed.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index 0a922ec494..10015a513b 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -285,18 +285,20 @@ static const char* fallback_chassis(void) {
/* We only list the really obvious cases here. The DMI data is unreliable enough, so let's not do any
* additional guesswork on top of that.
*
- * See the SMBIOS Specification 3.0 section 7.4.1 for details about the values listed here:
+ * See the SMBIOS Specification 3.5.0 section 7.4.1 for details about the values listed here:
*
- * https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.0.0.pdf
+ * https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.5.0.pdf
*/
switch (t) {
- case 0x3: /* Desktop */
- case 0x4: /* Low Profile Desktop */
- case 0x6: /* Mini Tower */
- case 0x7: /* Tower */
- case 0xD: /* All in one (i.e. PC built into monitor) */
+ case 0x03: /* Desktop */
+ case 0x04: /* Low Profile Desktop */
+ case 0x06: /* Mini Tower */
+ case 0x07: /* Tower */
+ case 0x0D: /* All in one (i.e. PC built into monitor) */
+ case 0x23: /* Mini PC */
+ case 0x24: /* Stick PC */
return "desktop";
case 0x8: /* Portable */
@@ -320,6 +322,10 @@ static const char* fallback_chassis(void) {
case 0x20: /* Detachable */
return "convertible";
+ case 0x21: /* IoT Gateway */
+ case 0x22: /* Embedded PC */
+ return "embedded";
+
default:
log_debug("Unhandled DMI chassis type 0x%02x, ignoring.", t);
}