]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
ldattach: order line disciplines canonically
authorTilman Schmidt <tilman@imap.cc>
Thu, 9 Jul 2015 13:22:32 +0000 (15:22 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 15 Jul 2015 13:46:18 +0000 (15:46 +0200)
List line disciplines in numerical order and put official names
before convenience aliases.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
sys-utils/ldattach.c

index 9c1235d6794ffe57842086139c45c0b2a7a8282f..99db32e86a774cabb9d1a740891960276636c27e 100644 (file)
@@ -62,14 +62,15 @@ struct gsm_config
 #ifndef N_GIGASET_M101
 # define N_GIGASET_M101 16
 #endif
-#ifndef N_GSM0710
-# define N_GSM0710 21
-#endif
 
 #ifndef N_PPS
 # define N_PPS 18
 #endif
 
+#ifndef N_GSM0710
+# define N_GSM0710 21
+#endif
+
 #define MAXINTROPARMLEN 32
 
 /* attach a line discipline ioctl */
@@ -86,7 +87,6 @@ struct ld_table {
 
 /* currently supported line disciplines, plus some aliases */
 static const struct ld_table ld_discs[] = {
-       { "GSM0710",            N_GSM0710},
        { "TTY",                N_TTY },
        { "SLIP",               N_SLIP },
        { "MOUSE",              N_MOUSE },
@@ -101,10 +101,11 @@ static const struct ld_table ld_discs[] = {
        { "SYNC_PPP",           N_SYNC_PPP },
        { "SYNCPPP",            N_SYNC_PPP },
        { "HCI",                N_HCI },
-       { "PPS",                N_PPS },
+       { "GIGASET_M101",       N_GIGASET_M101 },
        { "M101",               N_GIGASET_M101 },
        { "GIGASET",            N_GIGASET_M101 },
-       { "GIGASET_M101",       N_GIGASET_M101 },
+       { "PPS",                N_PPS },
+       { "GSM0710",            N_GSM0710},
        { NULL, 0 }
 };