Commit Graph

70 Commits

Author SHA1 Message Date
Ben Hutchings 70eebc40e2 setarch: add --uname-2.6 option for personality flag UNAME26
[kzak@redhat.com: - minor change in usage()]

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-29 11:16:25 +02:00
Karel Zak cfe2d24951 setarch: fix compiler warnings [-Wsign-compare]
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-01 13:16:21 +02:00
Francesco Cosoleto c60103a9f3 fstrim, setarch: replace error() with err()
This should improve a bit the portability as error() is a GNU extension and
util-linux provides fallbacks for err.h functions.

Fix compilation with icc, broken due to a reference to `__builtin_va_arg_pack'
in error.h using the -gcc default option.

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2011-06-08 13:09:18 +02:00
Karel Zak 6c7d5ae9a2 move struct option to .rodata
It does not make sense to have writable large arrays of "struct
option" on the stack.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-03 15:00:30 +01:00
Karel Zak 601d12fb10 rename util-linux-ng back to util-linux
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30 11:41:59 +01:00
Karel Zak 2d281745d9 setarch: add fallback for linux/personality
setarch.c:248: error: 'ADDR_NO_RANDOMIZE' undeclared (first use in this function)
setarch.c:248: error: (Each undeclared identifier is reported only once
setarch.c:248: error: for each function it appears in.)
setarch.c:251: error: 'FDPIC_FUNCPTRS' undeclared (first use in this function)
setarch.c:257: error: 'ADDR_COMPAT_LAYOUT' undeclared (first use in this function)
setarch.c:260: error: 'READ_IMPLIES_EXEC' undeclared (first use in this function)

Linux gzp1 2.4.36.1-gzp1 #1 SMP Tue Feb 19 10:23:48 CET 2008 i686 GNU/Linux

Reported-By: Gabor Z. Papp <gzp@papp.hu>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-05-13 14:00:39 +02:00
Dmitry V. Levin 3c52010c68 setarch: provide backwards compatibility
The getopt_long(3) use introduced by commit
8df90dec2b
broke backwards compatibility.

Old behavior:
$ i386 uname -m
i686

New behavior:
$ i386 uname -m
i386: invalid option -- m
Linux

Traditional method to fix it is to disable program arguments reordering
by prefixing getopt_long's optstring with '+' character.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-04-16 11:20:09 +02:00
Oliver Falk adf88e666a setarch: add missing alpha subarchs
Signed-off-by: Oliver Falk <oliver@linux-kernel.at>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-12-03 13:34:42 +01:00
Benno Schulenberg 2e2d3ff6a3 setarch: tweak the help text, and gettextize a forgotten message
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2007-11-06 01:09:04 +01:00
LaMont Jones 0901c3a467 setarch: fix compiler warning
NULL is not 0L.  It's (void*)0.  Passing that as a parameter to a function
that takes an unsigned long results in a warning about the lack of a cast.

Signed-off-by: LaMont Jones <lamont@debian.org>
2007-09-23 21:34:33 +02:00
Karel Zak bf928360f2 build-sys: remove hardcoded _GNU_SOURCE
We have AC_GNU_SOURCE, so we needn't any extra hardcoded _GNU_SOURCE.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-09-20 00:57:01 +02:00
Karel Zak 8df90dec2b setarch: add long options to setarch and update manpage
Co-Author: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-09-05 17:12:18 +02:00
Karel Zak 1e322675f9 setarch: add --3gb option fot compatibility with Debian linux{32,64} command
Debian had a pre-existing linux{32,64} command which supported only
--3gb and --4gb. Adding support for those options allows setarch to
replace that package.

(Note that long options are expected for all setarch flags in the next
release.)

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-08-27 23:34:08 +02:00
Karel Zak eeadb4f4cb setarch: finish adding parisc support
Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-08-27 23:16:28 +02:00
LaMont Jones 782e198d93 setarch: add parisc/parisc64 support
Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
2007-08-27 10:47:05 +02:00
Karel Zak 8855c38d04 setarch: cleanup licensing note
Signed-off-by: Jindrich Novy <jnovy@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-08-21 10:52:02 +02:00
Balint Cristian 9e19737a08 setarch: add __alpha__ support
Signed-off-by: Balint Cristian <cbalint@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-08-21 10:00:58 +02:00
Dennis Gilmore ee7401c58e setarch: add sparc32bash alias to keep compatibility with sparc32
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-08-21 09:55:28 +02:00
Karel Zak a5b47e0a39 setarch: add NLS support
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-03 01:36:03 +02:00
Karel Zak 8b3a46d2b0 sys-utils: added setarch command
This patch merges setarch command to util-linux-ng code.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-02 13:48:15 +02:00