All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tilman Schmidt <tilman@imap.cc>
To: util-linux@vger.kernel.org
Cc: Karel Zak <kzak@redhat.com>, Tilman Schmidt <tilman@imap.cc>,
	Paul Bolle <pebolle@tiscali.nl>, Sami Kerola <kerolasa@iki.fi>
Subject: [PATCH 2/3] ldattach: order line disciplines canonically
Date: Thu,  9 Jul 2015 15:22:32 +0200 (CEST)	[thread overview]
Message-ID: <309a90194b08d5c512dce7638564bcb31ed23c51.1436438005.git.tilman@imap.cc> (raw)
In-Reply-To: <cover.1436438005.git.tilman@imap.cc>

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 | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/sys-utils/ldattach.c b/sys-utils/ldattach.c
index 5317d22..bd4fadd 100644
--- a/sys-utils/ldattach.c
+++ b/sys-utils/ldattach.c
@@ -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 }
 };
 
-- 
1.9.2.459.g68773ac


  parent reply	other threads:[~2015-07-09 13:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09 13:22 [PATCH 0/3] ldattach updates Tilman Schmidt
2015-07-09 13:22 ` [PATCH 3/3] ldattach: always set line speed and format for N_GIGASET_M101 Tilman Schmidt
2015-07-09 13:22 ` [PATCH 1/3] ldattach: adapt print_table column width to widest entry Tilman Schmidt
2015-07-09 13:22 ` Tilman Schmidt [this message]
2015-07-15 13:50 ` [PATCH 0/3] ldattach updates Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=309a90194b08d5c512dce7638564bcb31ed23c51.1436438005.git.tilman@imap.cc \
    --to=tilman@imap.cc \
    --cc=kerolasa@iki.fi \
    --cc=kzak@redhat.com \
    --cc=pebolle@tiscali.nl \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.