Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/linux/linux_misc.c
Show First 20 Lines • Show All 698 Lines • ▼ Show 20 Lines | linux_newuname(struct thread *td, struct linux_newuname_args *args) | ||||
getcreddomainname(td->td_ucred, utsname.domainname, LINUX_MAX_UTSNAME); | getcreddomainname(td->td_ucred, utsname.domainname, LINUX_MAX_UTSNAME); | ||||
strlcpy(utsname.release, osrelease, LINUX_MAX_UTSNAME); | strlcpy(utsname.release, osrelease, LINUX_MAX_UTSNAME); | ||||
strlcpy(utsname.version, version, LINUX_MAX_UTSNAME); | strlcpy(utsname.version, version, LINUX_MAX_UTSNAME); | ||||
for (p = utsname.version; *p != '\0'; ++p) | for (p = utsname.version; *p != '\0'; ++p) | ||||
if (*p == '\n') { | if (*p == '\n') { | ||||
*p = '\0'; | *p = '\0'; | ||||
break; | break; | ||||
} | } | ||||
#if defined(__amd64__) | |||||
/* | |||||
* On amd64, Linux uname(2) needs to return "x86_64" | |||||
* for both 64-bit and 32-bit applications. On 32-bit, | |||||
* the string returned by getauxval(AT_PLATFORM) needs | |||||
* to remain "i686", though. | |||||
*/ | |||||
strlcpy(utsname.machine, "x86_64", LINUX_MAX_UTSNAME); | |||||
#else | |||||
strlcpy(utsname.machine, linux_kplatform, LINUX_MAX_UTSNAME); | strlcpy(utsname.machine, linux_kplatform, LINUX_MAX_UTSNAME); | ||||
#endif | |||||
return (copyout(&utsname, args->buf, sizeof(utsname))); | return (copyout(&utsname, args->buf, sizeof(utsname))); | ||||
} | } | ||||
struct l_utimbuf { | struct l_utimbuf { | ||||
l_time_t l_actime; | l_time_t l_actime; | ||||
l_time_t l_modtime; | l_time_t l_modtime; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 1,766 Lines • Show Last 20 Lines |