From b2d3bf29e86453421d7326c22f532951d3201f59 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sat, 4 May 2019 23:15:52 +0000 Subject: [PATCH] utimes.c: introduce do_utimensat This is going to be used to implement a parser of utimensat_time64 syscall. * utimes.c (do_utimensat): New function. (SYS_FUNC(utimensat)): Turn into a thin wrapper around do_utimensat. --- utimes.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/utimes.c b/utimes.c index 6656491a..5dd98a12 100644 --- a/utimes.c +++ b/utimes.c @@ -33,18 +33,24 @@ SYS_FUNC(futimesat) return RVAL_DECODED; } -SYS_FUNC(utimensat) +static int +do_utimensat(struct tcb *const tcp, const print_obj_by_addr_fn print_ts) { print_dirfd(tcp, tcp->u_arg[0]); printpath(tcp, tcp->u_arg[1]); tprints(", "); - print_timespec_utime_pair(tcp, tcp->u_arg[2]); + print_ts(tcp, tcp->u_arg[2]); tprints(", "); printflags(at_flags, tcp->u_arg[3], "AT_???"); return RVAL_DECODED; } +SYS_FUNC(utimensat) +{ + return do_utimensat(tcp, print_timespec_utime_pair); +} + #ifdef ALPHA SYS_FUNC(osf_utimes) { -- 2.40.0