Dmitry V. Levin
89636759d7
Remove temporary macros created for transition from long to kernel_ulong_t. Automatically replace PRI_kr[dux] with PRI_kl[dux] using $ git grep -l 'PRI_kr[dux]' | xargs sed -ri 's/PRI_kr([dux])/PRI_kl\1/g' * defs.h (PRI_krd, PRI_kru, PRI_krx): Remove. All users updated.
39 lines
586 B
C
39 lines
586 B
C
#include "defs.h"
|
|
|
|
#ifdef HAVE_LINUX_UTSNAME_H
|
|
# include <linux/utsname.h>
|
|
#endif
|
|
|
|
#ifndef __NEW_UTS_LEN
|
|
# define __NEW_UTS_LEN 64
|
|
#endif
|
|
|
|
SYS_FUNC(sethostname)
|
|
{
|
|
unsigned int len = tcp->u_arg[1];
|
|
|
|
if (len > __NEW_UTS_LEN) {
|
|
printaddr(tcp->u_arg[0]);
|
|
} else {
|
|
printstrn(tcp, tcp->u_arg[0], len);
|
|
}
|
|
|
|
tprintf(", %u", len);
|
|
|
|
return RVAL_DECODED;
|
|
}
|
|
|
|
#if defined(ALPHA)
|
|
SYS_FUNC(gethostname)
|
|
{
|
|
if (exiting(tcp)) {
|
|
if (syserror(tcp))
|
|
printaddr(tcp->u_arg[0]);
|
|
else
|
|
printstr(tcp, tcp->u_arg[0]);
|
|
tprintf(", %" PRI_klu, tcp->u_arg[1]);
|
|
}
|
|
return 0;
|
|
}
|
|
#endif /* ALPHA */
|