diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-02-28 15:11:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-28 15:11:36 +0100 |
commit | 2b827687efa3b1bcb5e539be1c2fb8046fc4283f (patch) | |
tree | dc7b920ddad46eae451f92d37af5734e1e10f41b | |
parent | c3988e728c119369248c890c030bc863ac07bec1 (diff) | |
parent | b70af833e84a78e881eea5076c2e422fb4c65b3b (diff) |
Merge pull request #5484 from dvdhrm/convertible
hostname: support 'convertible' chassis
-rw-r--r-- | man/hostnamectl.xml | 1 | ||||
-rw-r--r-- | man/machine-info.xml | 1 | ||||
-rw-r--r-- | shell-completion/bash/hostnamectl | 2 | ||||
-rw-r--r-- | shell-completion/zsh/_hostnamectl | 2 | ||||
-rw-r--r-- | src/hostname/hostnamed.c | 4 |
5 files changed, 8 insertions, 2 deletions
diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml index 9e1b593e6d..81bce2da6a 100644 --- a/man/hostnamectl.xml +++ b/man/hostnamectl.xml @@ -173,6 +173,7 @@ defined: <literal>desktop</literal>, <literal>laptop</literal>, + <literal>convertible</literal>, <literal>server</literal>, <literal>tablet</literal>, <literal>handset</literal>, diff --git a/man/machine-info.xml b/man/machine-info.xml index 351133670b..cd5997d4e2 100644 --- a/man/machine-info.xml +++ b/man/machine-info.xml @@ -120,6 +120,7 @@ chassis types are defined: <literal>desktop</literal>, <literal>laptop</literal>, + <literal>convertible</literal>, <literal>server</literal>, <literal>tablet</literal>, <literal>handset</literal>, diff --git a/shell-completion/bash/hostnamectl b/shell-completion/bash/hostnamectl index 6a252188ea..7cf8b6f631 100644 --- a/shell-completion/bash/hostnamectl +++ b/shell-completion/bash/hostnamectl @@ -52,7 +52,7 @@ _hostnamectl() { if [[ -z $verb ]]; then comps=${VERBS[*]} elif __contains_word "$verb" ${VERBS[CHASSIS]}; then - comps='desktop laptop server tablet handset watch embedded vm container' + comps='desktop laptop convertible server tablet handset watch embedded vm container' elif __contains_word "$verb" ${VERBS[STANDALONE]} ${VERBS[ICONS]} ${VERBS[NAME]}; then comps='' fi diff --git a/shell-completion/zsh/_hostnamectl b/shell-completion/zsh/_hostnamectl index 7528e0649d..8c4a354af2 100644 --- a/shell-completion/zsh/_hostnamectl +++ b/shell-completion/zsh/_hostnamectl @@ -18,7 +18,7 @@ _hostnamectl_set-icon-name() { _hostnamectl_set-chassis() { if (( CURRENT <= 3 )); then - _chassis=( desktop laptop server tablet handset watch embedded vm container ) + _chassis=( desktop laptop convertible server tablet handset watch embedded vm container ) _describe chassis _chassis else _message "no more options" diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index 4657cf8c77..a8df3dd2ed 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" @@ -199,6 +200,9 @@ static const char* fallback_chassis(void) { case 0x1E: /* Tablet */ return "tablet"; + + case 0x1F: /* Convertible */ + return "convertible"; } try_acpi: |