mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Fix Linux compat 'uname -m' on AMD64.
Submitted by: Jung-uk Kim <jkim@niksun.com> (patch reworked by me)
This commit is contained in:
parent
749f5f532e
commit
9c0552ce3e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=140213
@ -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)));
|
||||
|
Loading…
Reference in New Issue
Block a user