summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2017-02-28 11:54:52 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2017-02-28 11:54:52 +0100
commit34b52450c51fc8803c2ba6f71c8de59e8642bdda (patch)
tree981d6898026b641c06e9a87d8b11da4289bfc97f
parentcaf49b95b3a6efe9455078098c729d83b08e5206 (diff)
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.
-rw-r--r--man/hostnamectl.xml1
-rw-r--r--man/machine-info.xml1
-rw-r--r--shell-completion/bash/hostnamectl2
-rw-r--r--shell-completion/zsh/_hostnamectl2
-rw-r--r--src/hostname/hostnamed.c1
5 files changed, 5 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..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"