diff options
author | Sami Kerola | 2011-08-28 12:01:09 +0200 |
---|---|---|
committer | Sami Kerola | 2011-09-10 19:37:19 +0200 |
commit | 745627993ba07411e15badf5eb03a7b7e660f26c (patch) | |
tree | 3bb84541f9e69d76b386a6a0de4ee2b85b1dacee /sys-utils/setarch.c | |
parent | lib,cpuset: fix compiler warning [-Wuninitialized] (diff) | |
download | kernel-qcow2-util-linux-745627993ba07411e15badf5eb03a7b7e660f26c.tar.gz kernel-qcow2-util-linux-745627993ba07411e15badf5eb03a7b7e660f26c.tar.xz kernel-qcow2-util-linux-745627993ba07411e15badf5eb03a7b7e660f26c.zip |
setarch: move options struct to function scope
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/setarch.c')
-rw-r--r-- | sys-utils/setarch.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c index a33be70d7..865867075 100644 --- a/sys-utils/setarch.c +++ b/sys-utils/setarch.c @@ -86,27 +86,6 @@ enum { # define ADDR_LIMIT_3GB 0x8000000 #endif -/* Options --3gb and --4gb are for compatibitity with an old Debian setarch - implementation. */ -static const struct option longopts[] = -{ - { "help", 0, 0, 'h' }, - { "verbose", 0, 0, 'v' }, - { "addr-no-randomize", 0, 0, 'R' }, - { "fdpic-funcptrs", 0, 0, 'F' }, - { "mmap-page-zero", 0, 0, 'Z' }, - { "addr-compat-layout", 0, 0, 'L' }, - { "read-implies-exec", 0, 0, 'X' }, - { "32bit", 0, 0, 'B' }, - { "short-inode", 0, 0, 'I' }, - { "whole-seconds", 0, 0, 'S' }, - { "sticky-timeouts", 0, 0, 'T' }, - { "3gb", 0, 0, '3' }, - { "4gb", 0, 0, OPT_4GB }, - { "uname-2.6", 0, 0, OPT_UNAME26 }, - { NULL, 0, 0, 0 } -}; - static void __attribute__((__noreturn__)) show_help(void) { @@ -248,6 +227,27 @@ int main(int argc, char *argv[]) int verbose = 0; int c; + /* Options --3gb and --4gb are for compatibitity with an old Debian setarch + implementation. */ + static const struct option longopts[] = + { + { "help", 0, 0, 'h' }, + { "verbose", 0, 0, 'v' }, + { "addr-no-randomize", 0, 0, 'R' }, + { "fdpic-funcptrs", 0, 0, 'F' }, + { "mmap-page-zero", 0, 0, 'Z' }, + { "addr-compat-layout", 0, 0, 'L' }, + { "read-implies-exec", 0, 0, 'X' }, + { "32bit", 0, 0, 'B' }, + { "short-inode", 0, 0, 'I' }, + { "whole-seconds", 0, 0, 'S' }, + { "sticky-timeouts", 0, 0, 'T' }, + { "3gb", 0, 0, '3' }, + { "4gb", 0, 0, OPT_4GB }, + { "uname-2.6", 0, 0, OPT_UNAME26 }, + { NULL, 0, 0, 0 } + }; + setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); |