]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hostname: add 'convertible' chassis type
authorDavid Herrmann <dh.herrmann@gmail.com>
Tue, 28 Feb 2017 10:54:52 +0000 (11:54 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Tue, 28 Feb 2017 10:54:52 +0000 (11:54 +0100)
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.

man/hostnamectl.xml
man/machine-info.xml
shell-completion/bash/hostnamectl
shell-completion/zsh/_hostnamectl
src/hostname/hostnamed.c

index 9e1b593e6d9140b9e72805cecc7ee1e90fd4d950..81bce2da6aead84236fd19a88b58ea93d3930a5a 100644 (file)
         defined:
         <literal>desktop</literal>,
         <literal>laptop</literal>,
+        <literal>convertible</literal>,
         <literal>server</literal>,
         <literal>tablet</literal>,
         <literal>handset</literal>,
index 351133670b9d49fead01f8be07c6c6f99230e024..cd5997d4e2c2f62297daa381131db2e10b020d9f 100644 (file)
         chassis types are defined:
         <literal>desktop</literal>,
         <literal>laptop</literal>,
+        <literal>convertible</literal>,
         <literal>server</literal>,
         <literal>tablet</literal>,
         <literal>handset</literal>,
index 6a252188ea09b8aa8b20650489d26e794fe3ffaa..7cf8b6f631500f4340e4ac9581caa2d0edac2aa1 100644 (file)
@@ -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
index 7528e0649d62e441572d073a78519005efeb536b..8c4a354af2e2aad5add3c836914a3910c7521118 100644 (file)
@@ -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"
index 4657cf8c77b24e9a0861e70db159bb33d2be2e7a..c02e18a654db933a2d82744a89b7af77847b3cf3 100644 (file)
@@ -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"