From: Julian Seward Date: Tue, 20 Nov 2007 23:41:23 +0000 (+0000) Subject: Support sys_utimensat on x86-linux. (Dan McGee) X-Git-Tag: svn/VALGRIND_3_3_0~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d601bfed7d8abcb65feb541f7077a6895b56610;p=thirdparty%2Fvalgrind.git Support sys_utimensat on x86-linux. (Dan McGee) git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7195 --- diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h index d36b9b1135..9972be8431 100644 --- a/coregrind/m_syswrap/priv_syswrap-linux.h +++ b/coregrind/m_syswrap/priv_syswrap-linux.h @@ -141,6 +141,7 @@ DECL_TEMPLATE(linux, sys_symlinkat); DECL_TEMPLATE(linux, sys_readlinkat); DECL_TEMPLATE(linux, sys_fchmodat); DECL_TEMPLATE(linux, sys_faccessat); +DECL_TEMPLATE(linux, sys_utimensat); DECL_TEMPLATE(linux, sys_add_key); DECL_TEMPLATE(linux, sys_request_key); diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index c1769e5a89..f118434e57 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -2808,6 +2808,18 @@ PRE(sys_ioprio_set) } +/* XXX I don't think this is really the right place for this. + Move it elsewhere in this file? */ +PRE(sys_utimensat) +{ + PRINT("sys_utimensat ( %d, %p(%s), %p )", ARG1,ARG2,ARG2,ARG3); + PRE_REG_READ3(long, "utimensat", + int, dfd, char *, filename, struct timespec *, tvp); + PRE_MEM_RASCIIZ( "utimensat(filename)", ARG2 ); + if (ARG3 != 0) + PRE_MEM_READ( "utimensat(tvp)", ARG3, sizeof(struct vki_timespec) ); +} + #undef PRE #undef POST diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c index 001d2a81bc..49761e2566 100644 --- a/coregrind/m_syswrap/syswrap-x86-linux.c +++ b/coregrind/m_syswrap/syswrap-x86-linux.c @@ -2216,6 +2216,8 @@ const SyscallTableEntry ML_(syscall_table)[] = { // LINX_(__NR_unshare, sys_unshare), // 310 LINX_(__NR_set_robust_list, sys_set_robust_list), // 311 LINXY(__NR_get_robust_list, sys_get_robust_list), // 312 + + LINX_(__NR_utimensat, sys_utimensat), // 320 }; const UInt ML_(syscall_table_size) = diff --git a/include/vki/vki-scnums-x86-linux.h b/include/vki/vki-scnums-x86-linux.h index 7dd881c478..aa004cb1e8 100644 --- a/include/vki/vki-scnums-x86-linux.h +++ b/include/vki/vki-scnums-x86-linux.h @@ -351,6 +351,7 @@ #define __NR_sync_file_range 314 #define __NR_tee 315 #define __NR_vmsplice 316 +#define __NR_utimensat 320 #endif /* __VKI_SCNUMS_X86_LINUX_H */