diff options
author | obrien <obrien@FreeBSD.org> | 2005-01-14 03:45:26 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2005-01-14 03:45:26 +0000 |
commit | 98c3a8a894b937803df272ee68fb791709bc75d5 (patch) | |
tree | d48d461e8aa48db1477bd3b133793c6e7967c90b /sys | |
parent | 17c8f614b7fd81686914ff206f23dcaa54291671 (diff) | |
download | FreeBSD-src-98c3a8a894b937803df272ee68fb791709bc75d5.zip FreeBSD-src-98c3a8a894b937803df272ee68fb791709bc75d5.tar.gz |
Fix Linux compat 'uname -m' on AMD64.
Submitted by: Jung-uk Kim <jkim@niksun.com>
(patch reworked by me)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/linux/linux_misc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index f17e0ad..6668841 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -763,9 +763,15 @@ linux_newuname(struct thread *td, struct linux_newuname_args *args) } 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 +#endif /* __i386__ */ strlcpy(utsname.domainname, domainname, LINUX_MAX_UTSNAME); return (copyout(&utsname, args->buf, sizeof(utsname))); |