summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r--sys/compat/linux/linux_misc.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index bdbb5dd..82bd7b9 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -92,10 +92,6 @@ __FBSDID("$FreeBSD$");
#include <compat/linux/linux_emul.h>
#include <compat/linux/linux_misc.h>
-#ifdef __i386__
-#include <machine/cputypes.h>
-#endif
-
#define BSD_TO_LINUX_SIGNAL(sig) \
(((sig) <= LINUX_SIGTBLSZ) ? bsd_to_linux_signal[_SIG_IDX(sig)] : sig)
@@ -731,34 +727,8 @@ linux_newuname(struct thread *td, struct linux_newuname_args *args)
*p = '\0';
break;
}
-#ifdef __i386__
- {
- const char *class;
+ strlcpy(utsname.machine, linux_platform, LINUX_MAX_UTSNAME);
- switch (cpu_class) {
- case CPUCLASS_686:
- class = "i686";
- break;
- case CPUCLASS_586:
- class = "i586";
- break;
- case CPUCLASS_486:
- class = "i486";
- break;
- default:
- class = "i386";
- }
- strlcpy(utsname.machine, class, LINUX_MAX_UTSNAME);
- }
-#elif defined(__amd64__) /* XXX: Linux can change 'personality'. */
-#ifdef COMPAT_LINUX32
- strlcpy(utsname.machine, "i686", LINUX_MAX_UTSNAME);
-#else
- strlcpy(utsname.machine, "x86_64", LINUX_MAX_UTSNAME);
-#endif /* COMPAT_LINUX32 */
-#else /* something other than i386 or amd64 - assume we and Linux agree */
- strlcpy(utsname.machine, machine, LINUX_MAX_UTSNAME);
-#endif /* __i386__ */
mtx_lock(&hostname_mtx);
strlcpy(utsname.domainname, V_domainname, LINUX_MAX_UTSNAME);
mtx_unlock(&hostname_mtx);
OpenPOWER on IntegriCloud