[PATCH] setarch: Fix ppc64le architectures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



setarch currently fails on ppc64le because it tries to
use big endian architecture names. Fix it.

Signed-off-by: Anton Blanchard <anton@xxxxxxxxx>
---

diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
index 99724c6..957bb2b 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"},
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux