All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benno Schulenberg <bensberg@justemail.net>
To: util-linux@vger.kernel.org
Subject: [PATCH 3/4] setarch: accept the option --list in any position
Date: Sat, 10 Jan 2015 14:41:34 +0100	[thread overview]
Message-ID: <1420897295-17573-3-git-send-email-bensberg@justemail.net> (raw)
In-Reply-To: <1420897295-17573-1-git-send-email-bensberg@justemail.net>

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
 sys-utils/setarch.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
index a09625c..a60d2b0 100644
--- a/sys-utils/setarch.c
+++ b/sys-utils/setarch.c
@@ -44,7 +44,8 @@
 /* Options without equivalent short options */
 enum {
 	OPT_4GB = CHAR_MAX + 1,
-	OPT_UNAME26
+	OPT_UNAME26,
+	OPT_LIST
 };
 
 #define turn_on(_flag, _opts) \
@@ -277,6 +278,7 @@ int main(int argc, char *argv[])
 		{"3gb",			no_argument,	NULL,	'3'},
 		{"4gb",			no_argument,	NULL,	OPT_4GB},
 		{"uname-2.6",		no_argument,	NULL,	OPT_UNAME26},
+		{"list",		no_argument,	NULL,	OPT_LIST},
 		{NULL,			0,		NULL,	0}
 	};
 
@@ -360,6 +362,9 @@ int main(int argc, char *argv[])
 		case OPT_UNAME26:
 			turn_on(UNAME26, options);
 			break;
+		case OPT_LIST:
+			set_arch(argv[0], 0L, 1);
+			return EXIT_SUCCESS;
 		default:
 			show_usage(NULL);
 		}
-- 
1.7.0.4


  parent reply	other threads:[~2015-01-10 13:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-10 13:41 [PATCH 1/4] setarch: differentiate between "unrecognized" and "cannot set" Benno Schulenberg
2015-01-10 13:41 ` [PATCH 2/4] docs: mention that setarch may not be able to set all listed architectures Benno Schulenberg
2015-01-11 16:19   ` JWP
2015-01-11 17:07     ` Benno Schulenberg
2015-01-11 18:43       ` JWP
2015-01-12 10:41         ` karel Zak
2015-01-12 11:23   ` Karel Zak
2015-01-10 13:41 ` Benno Schulenberg [this message]
2015-01-12 11:25   ` [PATCH 3/4] setarch: accept the option --list in any position Karel Zak
2015-01-10 13:41 ` [PATCH 4/4] setarch: in the usage text only mention options that actually do something Benno Schulenberg
2015-01-12 11:33   ` Karel Zak
2015-01-12 11:23 ` [PATCH 1/4] setarch: differentiate between "unrecognized" and "cannot set" 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=1420897295-17573-3-git-send-email-bensberg@justemail.net \
    --to=bensberg@justemail.net \
    --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.