DECL_TEMPLATE(generic, sys_setuid);
DECL_TEMPLATE(generic, sys_gettimeofday);
DECL_TEMPLATE(generic, sys_madvise);
+DECL_TEMPLATE(generic, sys_sethostname);
// These ones aren't POSIX, but are in some standard and look reasonably
// generic, and are the same for all architectures under Linux.
// (__NR_swapoff, sys_swapoff), // 168
// (__NR_reboot, sys_reboot), // 169
- // (__NR_sethostname, sys_sethostname), // 170
+ GENX_(__NR_sethostname, sys_sethostname), // 170
// (__NR_setdomainname, sys_setdomainname), // 171
GENX_(__NR_iopl, sys_iopl), // 172
LINX_(__NR_ioperm, sys_ioperm), // 173
POST_MEM_WRITE( ARG2, sizeof(vki_stack_t));
}
+PRE(sys_sethostname)
+{
+ PRINT("sys_sethostname ( %#lx, %ld )", ARG1,ARG2);
+ PRE_REG_READ2(long, "sethostname", char *, name, int, len);
+ PRE_MEM_READ( "sethostname(name)", ARG1, ARG2 );
+}
+
#undef PRE
#undef POST
LINX_(__NR_setregid, sys_setregid16), // 71
PLAX_(__NR_sigsuspend, sys_sigsuspend), // 72
LINXY(__NR_sigpending, sys_sigpending), // 73
-//zz // (__NR_sethostname, sys_sethostname), // 74 */*
+ GENX_(__NR_sethostname, sys_sethostname), // 74
//zz
GENX_(__NR_setrlimit, sys_setrlimit), // 75
GENXY(__NR_getrlimit, sys_old_getrlimit), // 76