]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
setarch: Fix ppc64le architectures
authorAnton Blanchard <anton@samba.org>
Sun, 6 Apr 2014 23:18:13 +0000 (09:18 +1000)
committerKarel Zak <kzak@redhat.com>
Mon, 7 Apr 2014 10:38:22 +0000 (12:38 +0200)
setarch currently fails on ppc64le because it tries to
use big endian architecture names. Fix it.

Signed-off-by: Anton Blanchard <anton@samba.org>
sys-utils/setarch.c

index 99724c6dacee2d40f089ef52e8bbe84cb2862d4c..957bb2b0308acbb3f4b8f515593aedccebc3ac1f 100644 (file)
@@ -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"},