summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrobert <robert@FreeBSD.org>2002-02-27 16:47:27 +0000
committerrobert <robert@FreeBSD.org>2002-02-27 16:47:27 +0000
commitb8e607ed843c9be41ab025480d4d09f767463f3b (patch)
treec95d4734171ed9828f6b3ff90b1b709d314e8aca /sys
parenta441b857b6d8cb70a997637312989e8a04b78462 (diff)
downloadFreeBSD-src-b8e607ed843c9be41ab025480d4d09f767463f3b.zip
FreeBSD-src-b8e607ed843c9be41ab025480d4d09f767463f3b.tar.gz
Use the updated getcredhostname() function.
Diffstat (limited to 'sys')
-rw-r--r--sys/compat/linux/linux_misc.c3
-rw-r--r--sys/compat/svr4/svr4_stat.c4
2 files changed, 2 insertions, 5 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 562b37f..031c406 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -702,8 +702,7 @@ linux_newuname(struct thread *td, struct linux_newuname_args *args)
bzero(&utsname, sizeof(utsname));
strncpy(utsname.sysname, osname, LINUX_MAX_UTSNAME-1);
- strncpy(utsname.nodename, getcredhostname(td->td_ucred),
- LINUX_MAX_UTSNAME-1);
+ getcredhostname(td->td_ucred, utsname.nodename, LINUX_MAX_UTSNAME-1);
strncpy(utsname.release, osrelease, LINUX_MAX_UTSNAME-1);
strncpy(utsname.version, version, LINUX_MAX_UTSNAME-1);
strncpy(utsname.machine, machine, LINUX_MAX_UTSNAME-1);
diff --git a/sys/compat/svr4/svr4_stat.c b/sys/compat/svr4/svr4_stat.c
index fbe05a9..a3880d5 100644
--- a/sys/compat/svr4/svr4_stat.c
+++ b/sys/compat/svr4/svr4_stat.c
@@ -480,9 +480,7 @@ svr4_sys_uname(td, uap)
strncpy(sut.sysname, ostype, sizeof(sut.sysname));
sut.sysname[sizeof(sut.sysname) - 1] = '\0';
- strncpy(sut.nodename, getcredhostname(td->td_ucred),
- sizeof(sut.nodename));
- sut.nodename[sizeof(sut.nodename) - 1] = '\0';
+ getcredhostname(td->td_ucred, sut.nodename, sizeof(sut.nodename));
strncpy(sut.release, osrelease, sizeof(sut.release));
sut.release[sizeof(sut.release) - 1] = '\0';
OpenPOWER on IntegriCloud