From 34b52450c51fc8803c2ba6f71c8de59e8642bdda Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Tue, 28 Feb 2017 11:54:52 +0100 Subject: hostname: add 'convertible' chassis type Add the 'convertible' type to the set of allowed chassis. This applies to all devices that can be transformed by the user from laptop style to tablet style. This does not add any auto-detection, yet. It only makes 'set-chassis' accept 'convertible' as valid input. --- src/hostname/hostnamed.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index 4657cf8c77..c02e18a654 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -133,6 +133,7 @@ static bool valid_chassis(const char *chassis) { "container\0" "desktop\0" "laptop\0" + "convertible\0" "server\0" "tablet\0" "handset\0" -- cgit v1.2.3-54-g00ecf From b70af833e84a78e881eea5076c2e422fb4c65b3b Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Tue, 28 Feb 2017 11:58:14 +0100 Subject: hostname: detect convertible dmi chassis type 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 . --- src/hostname/hostnamed.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index c02e18a654..a8df3dd2ed 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -200,6 +200,9 @@ static const char* fallback_chassis(void) { case 0x1E: /* Tablet */ return "tablet"; + + case 0x1F: /* Convertible */ + return "convertible"; } try_acpi: -- cgit v1.2.3-54-g00ecf