]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hostname: detect convertible dmi chassis type 5484/head
authorDavid Herrmann <dh.herrmann@gmail.com>
Tue, 28 Feb 2017 10:58:14 +0000 (11:58 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Tue, 28 Feb 2017 10:58:14 +0000 (11:58 +0100)
Detect the 'Convertible' dmi chassis type properly. Use the new
'convertible' chassis class of hostnamed, instead of returning the
generic 'computer' chassis class.

Based on a patch by Jani Nikula <jani.nikula@intel.com>.

src/hostname/hostnamed.c

index c02e18a654db933a2d82744a89b7af77847b3cf3..a8df3dd2eddee7cefae0618464cc84d94f72fcef 100644 (file)
@@ -200,6 +200,9 @@ static const char* fallback_chassis(void) {
 
         case 0x1E: /* Tablet */
                 return "tablet";
+
+        case 0x1F: /* Convertible */
+                return "convertible";
         }
 
 try_acpi: