diff options
author | Anton Blanchard <anton@samba.org> | 2014-04-07 09:18:13 +1000 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2014-04-23 11:55:09 +0200 |
commit | 9913bbc7900c389eae9fed36fa4189049e97f42b (patch) | |
tree | 2bed36c04e2f7da1ddd50d99740280b91bf47a26 | |
parent | a3f6bf3ad7d5d9e7f61254d9a72664e5fe0c3b75 (diff) | |
download | util-linux-9913bbc7900c389eae9fed36fa4189049e97f42b.tar.gz |
setarch: Fix ppc64le architectures
setarch currently fails on ppc64le because it tries to
use big endian architecture names. Fix it.
Signed-off-by: Anton Blanchard <anton@samba.org>
-rw-r--r-- | sys-utils/setarch.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c index 99724c6da..957bb2b03 100644 --- a/sys-utils/setarch.c +++ b/sys-utils/setarch.c @@ -149,11 +149,17 @@ set_arch(const char *pers, unsigned long options, int list) {PER_LINUX32, "linux32", NULL}, {PER_LINUX, "linux64", NULL}, #if defined(__powerpc__) || defined(__powerpc64__) +#ifdef __BIG_ENDIAN__ {PER_LINUX32, "ppc32", "ppc"}, {PER_LINUX32, "ppc", "ppc"}, {PER_LINUX, "ppc64", "ppc64"}, {PER_LINUX, "ppc64pseries", "ppc64"}, {PER_LINUX, "ppc64iseries", "ppc64"}, +#else + {PER_LINUX32, "ppc32le", "ppcle"}, + {PER_LINUX32, "ppcle", "ppcle"}, + {PER_LINUX, "ppc64le", "ppc64le"}, +#endif #endif #if defined(__x86_64__) || defined(__i386__) || defined(__ia64__) {PER_LINUX32, "i386", "i386"}, |