blob: 734a79b8d3fe10cde95a70ffd0a2e3136f11d80c [file] [log] [blame]
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001/*
2 * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
3 * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
4 * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
Elliott Hughes28e98bc2018-06-14 16:59:04 -07005 * Copyright (c) 1996-2018 The strace developers.
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00006 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. The name of the author may not be used to endorse or promote products
17 * derived from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000029 */
30
31#include "defs.h"
Mike Frysingerf1639d82014-12-30 19:08:50 -050032#include <fcntl.h>
Dmitry V. Levin0e946ab2015-07-17 23:56:54 +000033#include <signal.h>
Wichert Akkermand856b992000-10-13 12:47:12 +000034#include <sys/timex.h>
Roland McGrath6afc5652007-07-24 01:57:11 +000035
Dmitry V. Levinf57edf42015-09-18 16:15:49 +000036static void
Elliott Hughesd35df492017-02-15 15:19:05 -080037print_timezone(struct tcb *const tcp, const kernel_ulong_t addr)
Dmitry V. Levinf57edf42015-09-18 16:15:49 +000038{
39 struct timezone tz;
40
41 if (umove_or_printaddr(tcp, addr, &tz))
42 return;
43
44 tprintf("{tz_minuteswest=%d, tz_dsttime=%d}",
45 tz.tz_minuteswest, tz.tz_dsttime);
46}
47
Dmitry V. Levina0bd3742015-04-07 01:36:50 +000048SYS_FUNC(gettimeofday)
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000049{
50 if (exiting(tcp)) {
Dmitry V. Levinf1e3a322015-09-18 15:16:11 +000051 print_timeval(tcp, tcp->u_arg[0]);
Denys Vlasenko60fe8c12011-09-01 10:00:28 +020052 tprints(", ");
Dmitry V. Levinf57edf42015-09-18 16:15:49 +000053 print_timezone(tcp, tcp->u_arg[1]);
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000054 }
55 return 0;
56}
57
Wichert Akkermanf5eeabb1999-11-18 17:09:47 +000058#ifdef ALPHA
Dmitry V. Levina0bd3742015-04-07 01:36:50 +000059SYS_FUNC(osf_gettimeofday)
Wichert Akkermanf5eeabb1999-11-18 17:09:47 +000060{
Denys Vlasenko1d632462009-04-14 12:51:00 +000061 if (exiting(tcp)) {
Dmitry V. Levinf1e3a322015-09-18 15:16:11 +000062 print_timeval32(tcp, tcp->u_arg[0]);
Denys Vlasenko60fe8c12011-09-01 10:00:28 +020063 tprints(", ");
Dmitry V. Levinf57edf42015-09-18 16:15:49 +000064 print_timezone(tcp, tcp->u_arg[1]);
Denys Vlasenko1d632462009-04-14 12:51:00 +000065 }
66 return 0;
Wichert Akkermanf5eeabb1999-11-18 17:09:47 +000067}
68#endif
69
Dmitry V. Levina0bd3742015-04-07 01:36:50 +000070SYS_FUNC(settimeofday)
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000071{
Dmitry V. Levinf1e3a322015-09-18 15:16:11 +000072 print_timeval(tcp, tcp->u_arg[0]);
Dmitry V. Levin76c8f662015-07-16 21:07:06 +000073 tprints(", ");
Dmitry V. Levinf57edf42015-09-18 16:15:49 +000074 print_timezone(tcp, tcp->u_arg[1]);
Dmitry V. Levin76c8f662015-07-16 21:07:06 +000075
76 return RVAL_DECODED;
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000077}
78
Wichert Akkermanf5eeabb1999-11-18 17:09:47 +000079#ifdef ALPHA
Dmitry V. Levina0bd3742015-04-07 01:36:50 +000080SYS_FUNC(osf_settimeofday)
Wichert Akkermanf5eeabb1999-11-18 17:09:47 +000081{
Dmitry V. Levinf1e3a322015-09-18 15:16:11 +000082 print_timeval32(tcp, tcp->u_arg[0]);
Dmitry V. Levin76c8f662015-07-16 21:07:06 +000083 tprints(", ");
Dmitry V. Levinf57edf42015-09-18 16:15:49 +000084 print_timezone(tcp, tcp->u_arg[1]);
Dmitry V. Levin76c8f662015-07-16 21:07:06 +000085
86 return RVAL_DECODED;
Wichert Akkermanf5eeabb1999-11-18 17:09:47 +000087}
88#endif
89
Dmitry V. Levina0bd3742015-04-07 01:36:50 +000090SYS_FUNC(nanosleep)
Dmitry V. Levin2e55ff42008-09-03 01:02:46 +000091{
92 if (entering(tcp)) {
93 print_timespec(tcp, tcp->u_arg[0]);
Denys Vlasenko60fe8c12011-09-01 10:00:28 +020094 tprints(", ");
Dmitry V. Levin2e55ff42008-09-03 01:02:46 +000095 } else {
Dmitry V. Levin9af94a22015-09-18 01:54:59 +000096
97 /*
98 * Second (returned) timespec is only significant if syscall
99 * was interrupted. On success and in case of other errors we
100 * print only its address, since kernel doesn't modify it,
Denys Vlasenko47932212013-06-30 23:53:49 +0200101 * and printing the value may show uninitialized data.
Denys Vlasenko64acaa12012-01-28 02:29:36 +0100102 */
Dmitry V. Levin9af94a22015-09-18 01:54:59 +0000103 if (is_erestart(tcp)) {
104 temporarily_clear_syserror(tcp);
Dmitry V. Levin2e55ff42008-09-03 01:02:46 +0000105 print_timespec(tcp, tcp->u_arg[1]);
Dmitry V. Levin9af94a22015-09-18 01:54:59 +0000106 restore_cleared_syserror(tcp);
107 } else {
108 printaddr(tcp->u_arg[1]);
Denys Vlasenko47932212013-06-30 23:53:49 +0200109 }
Dmitry V. Levin2e55ff42008-09-03 01:02:46 +0000110 }
111 return 0;
112}
113
Dmitry V. Levin0ed617b2014-04-25 23:30:54 +0000114#include "xlat/itimer_which.h"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000115
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000116SYS_FUNC(getitimer)
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000117{
118 if (entering(tcp)) {
Elliott Hughes03a418e2018-06-15 13:11:40 -0700119 printxval_index(itimer_which, (unsigned int) tcp->u_arg[0],
120 "ITIMER_???");
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200121 tprints(", ");
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000122 } else {
Dmitry V. Levin322be802015-09-17 20:23:31 +0000123 print_itimerval(tcp, tcp->u_arg[1]);
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000124 }
125 return 0;
126}
127
Wichert Akkermanf5eeabb1999-11-18 17:09:47 +0000128#ifdef ALPHA
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000129SYS_FUNC(osf_getitimer)
Wichert Akkermanf5eeabb1999-11-18 17:09:47 +0000130{
Denys Vlasenko1d632462009-04-14 12:51:00 +0000131 if (entering(tcp)) {
Elliott Hughes03a418e2018-06-15 13:11:40 -0700132 printxval_index(itimer_which, (unsigned int) tcp->u_arg[0],
133 "ITIMER_???");
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200134 tprints(", ");
Denys Vlasenko1d632462009-04-14 12:51:00 +0000135 } else {
Dmitry V. Levin322be802015-09-17 20:23:31 +0000136 print_itimerval32(tcp, tcp->u_arg[1]);
Denys Vlasenko1d632462009-04-14 12:51:00 +0000137 }
138 return 0;
Wichert Akkermanf5eeabb1999-11-18 17:09:47 +0000139}
140#endif
141
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000142SYS_FUNC(setitimer)
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000143{
144 if (entering(tcp)) {
Elliott Hughes03a418e2018-06-15 13:11:40 -0700145 printxval_index(itimer_which, (unsigned int) tcp->u_arg[0],
146 "ITIMER_???");
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200147 tprints(", ");
Dmitry V. Levin322be802015-09-17 20:23:31 +0000148 print_itimerval(tcp, tcp->u_arg[1]);
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200149 tprints(", ");
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000150 } else {
Dmitry V. Levin322be802015-09-17 20:23:31 +0000151 print_itimerval(tcp, tcp->u_arg[2]);
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000152 }
153 return 0;
154}
155
Wichert Akkermanf5eeabb1999-11-18 17:09:47 +0000156#ifdef ALPHA
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000157SYS_FUNC(osf_setitimer)
Wichert Akkermanf5eeabb1999-11-18 17:09:47 +0000158{
Denys Vlasenko1d632462009-04-14 12:51:00 +0000159 if (entering(tcp)) {
Elliott Hughes03a418e2018-06-15 13:11:40 -0700160 printxval_index(itimer_which, (unsigned int) tcp->u_arg[0],
161 "ITIMER_???");
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200162 tprints(", ");
Dmitry V. Levin322be802015-09-17 20:23:31 +0000163 print_itimerval32(tcp, tcp->u_arg[1]);
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200164 tprints(", ");
Denys Vlasenko1d632462009-04-14 12:51:00 +0000165 } else {
Dmitry V. Levin322be802015-09-17 20:23:31 +0000166 print_itimerval32(tcp, tcp->u_arg[2]);
Denys Vlasenko1d632462009-04-14 12:51:00 +0000167 }
168 return 0;
Wichert Akkermanf5eeabb1999-11-18 17:09:47 +0000169}
170#endif
171
Dmitry V. Levin0ed617b2014-04-25 23:30:54 +0000172#include "xlat/adjtimex_state.h"
Dmitry V. Levin1a684d62006-12-13 17:42:32 +0000173
Dmitry V. Levin73215472012-03-11 21:25:51 +0000174static int
Elliott Hughesd35df492017-02-15 15:19:05 -0800175do_adjtimex(struct tcb *const tcp, const kernel_ulong_t addr)
Dmitry V. Levin73215472012-03-11 21:25:51 +0000176{
Dmitry V. Levindad1eef2015-09-16 21:58:36 +0000177 if (print_timex(tcp, addr))
Dmitry V. Levin73215472012-03-11 21:25:51 +0000178 return 0;
Elliott Hughes03a418e2018-06-15 13:11:40 -0700179 tcp->auxstr = xlat_idx(adjtimex_state, ARRAY_SIZE(adjtimex_state) - 1,
180 (kernel_ulong_t) tcp->u_rval);
Elliott Hughes28e98bc2018-06-14 16:59:04 -0700181 return RVAL_STR;
Dmitry V. Levin73215472012-03-11 21:25:51 +0000182}
183
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000184SYS_FUNC(adjtimex)
Dmitry V. Levin165b15d2006-12-13 17:43:45 +0000185{
Dmitry V. Levin73215472012-03-11 21:25:51 +0000186 if (exiting(tcp))
187 return do_adjtimex(tcp, tcp->u_arg[0]);
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000188 return 0;
189}
Roland McGrath1e356792003-03-30 23:52:28 +0000190
Dmitry V. Levin0ed617b2014-04-25 23:30:54 +0000191#include "xlat/clockflags.h"
Dmitry V. Levin0ed617b2014-04-25 23:30:54 +0000192#include "xlat/clocknames.h"
Roland McGrath54a4edd2004-08-31 06:52:45 +0000193
Stefan Sørensena5fea902014-02-03 10:01:27 +0100194static void
195printclockname(int clockid)
196{
197#ifdef CLOCKID_TO_FD
Dmitry V. Levind35bdca2014-04-26 18:10:19 +0000198# include "xlat/cpuclocknames.h"
199
Stefan Sørensena5fea902014-02-03 10:01:27 +0100200 if (clockid < 0) {
Elliott Hughesc1873762018-12-19 15:13:36 -0800201 if (xlat_verbose(xlat_verbosity) != XLAT_STYLE_ABBREV)
202 tprintf("%d", clockid);
203
204 if (xlat_verbose(xlat_verbosity) == XLAT_STYLE_RAW)
205 return;
206
207 if (xlat_verbose(xlat_verbosity) == XLAT_STYLE_VERBOSE)
208 tprints(" /* ");
209
Stefan Sørensena5fea902014-02-03 10:01:27 +0100210 if ((clockid & CLOCKFD_MASK) == CLOCKFD)
211 tprintf("FD_TO_CLOCKID(%d)", CLOCKID_TO_FD(clockid));
212 else {
Elliott Hughes03a418e2018-06-15 13:11:40 -0700213 tprintf("%s(%d,",
214 CPUCLOCK_PERTHREAD(clockid) ?
215 "MAKE_THREAD_CPUCLOCK" :
216 "MAKE_PROCESS_CPUCLOCK",
217 CPUCLOCK_PID(clockid));
218 printxval_index(cpuclocknames,
219 (unsigned int) clockid & CLOCKFD_MASK,
220 "CPUCLOCK_???");
Stefan Sørensena5fea902014-02-03 10:01:27 +0100221 tprints(")");
222 }
Elliott Hughesc1873762018-12-19 15:13:36 -0800223
224 if (xlat_verbose(xlat_verbosity) == XLAT_STYLE_VERBOSE)
225 tprints(" */");
Elliott Hughesdc75b012017-07-05 13:54:44 -0700226 } else
Stefan Sørensena5fea902014-02-03 10:01:27 +0100227#endif
Elliott Hughes03a418e2018-06-15 13:11:40 -0700228 printxval_index(clocknames, clockid, "CLOCK_???");
Stefan Sørensena5fea902014-02-03 10:01:27 +0100229}
230
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000231SYS_FUNC(clock_settime)
Roland McGrath1e356792003-03-30 23:52:28 +0000232{
Dmitry V. Levin76c8f662015-07-16 21:07:06 +0000233 printclockname(tcp->u_arg[0]);
234 tprints(", ");
Dmitry V. Levin59385262015-09-18 15:16:11 +0000235 print_timespec(tcp, tcp->u_arg[1]);
Dmitry V. Levin76c8f662015-07-16 21:07:06 +0000236
237 return RVAL_DECODED;
Roland McGrath1e356792003-03-30 23:52:28 +0000238}
239
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000240SYS_FUNC(clock_gettime)
Roland McGrath1e356792003-03-30 23:52:28 +0000241{
242 if (entering(tcp)) {
Stefan Sørensena5fea902014-02-03 10:01:27 +0100243 printclockname(tcp->u_arg[0]);
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200244 tprints(", ");
Roland McGrath1e356792003-03-30 23:52:28 +0000245 } else {
Dmitry V. Levin59385262015-09-18 15:16:11 +0000246 print_timespec(tcp, tcp->u_arg[1]);
Roland McGrath1e356792003-03-30 23:52:28 +0000247 }
248 return 0;
249}
250
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000251SYS_FUNC(clock_nanosleep)
Roland McGrath1e356792003-03-30 23:52:28 +0000252{
253 if (entering(tcp)) {
Stefan Sørensena5fea902014-02-03 10:01:27 +0100254 printclockname(tcp->u_arg[0]);
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200255 tprints(", ");
Roland McGrathb2dee132005-06-01 19:02:36 +0000256 printflags(clockflags, tcp->u_arg[1], "TIMER_???");
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200257 tprints(", ");
Dmitry V. Levin59385262015-09-18 15:16:11 +0000258 print_timespec(tcp, tcp->u_arg[2]);
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200259 tprints(", ");
Roland McGrath1e356792003-03-30 23:52:28 +0000260 } else {
Dmitry V. Levinc648b4a2015-09-18 14:24:51 +0000261 /*
262 * Second (returned) timespec is only significant
263 * if syscall was interrupted and flags is not TIMER_ABSTIME.
264 */
265 if (!tcp->u_arg[1] && is_erestart(tcp)) {
266 temporarily_clear_syserror(tcp);
Dmitry V. Levin59385262015-09-18 15:16:11 +0000267 print_timespec(tcp, tcp->u_arg[3]);
Dmitry V. Levinc648b4a2015-09-18 14:24:51 +0000268 restore_cleared_syserror(tcp);
269 } else {
270 printaddr(tcp->u_arg[3]);
271 }
Roland McGrath1e356792003-03-30 23:52:28 +0000272 }
273 return 0;
274}
275
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000276SYS_FUNC(clock_adjtime)
Dmitry V. Levin73215472012-03-11 21:25:51 +0000277{
278 if (exiting(tcp))
279 return do_adjtimex(tcp, tcp->u_arg[1]);
Stefan Sørensena5fea902014-02-03 10:01:27 +0100280 printclockname(tcp->u_arg[0]);
Dmitry V. Levin73215472012-03-11 21:25:51 +0000281 tprints(", ");
282 return 0;
283}
284
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000285SYS_FUNC(timer_create)
Roland McGrath1e356792003-03-30 23:52:28 +0000286{
287 if (entering(tcp)) {
Stefan Sørensena5fea902014-02-03 10:01:27 +0100288 printclockname(tcp->u_arg[0]);
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200289 tprints(", ");
Dmitry V. Levin6f950cc2015-09-16 16:31:43 +0000290 print_sigevent(tcp, tcp->u_arg[1]);
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200291 tprints(", ");
Roland McGrath1e356792003-03-30 23:52:28 +0000292 } else {
Dmitry V. Levin71178352015-07-16 18:18:09 +0000293 printnum_int(tcp, tcp->u_arg[2], "%d");
Roland McGrath1e356792003-03-30 23:52:28 +0000294 }
295 return 0;
296}
297
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000298SYS_FUNC(timer_settime)
Roland McGrath1e356792003-03-30 23:52:28 +0000299{
300 if (entering(tcp)) {
Dmitry V. Levin71178352015-07-16 18:18:09 +0000301 tprintf("%d, ", (int) tcp->u_arg[0]);
Roland McGrathb2dee132005-06-01 19:02:36 +0000302 printflags(clockflags, tcp->u_arg[1], "TIMER_???");
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200303 tprints(", ");
Dmitry V. Levin22060852015-09-17 16:47:03 +0000304 print_itimerspec(tcp, tcp->u_arg[2]);
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200305 tprints(", ");
Roland McGrath1e356792003-03-30 23:52:28 +0000306 } else {
Dmitry V. Levin22060852015-09-17 16:47:03 +0000307 print_itimerspec(tcp, tcp->u_arg[3]);
Roland McGrath1e356792003-03-30 23:52:28 +0000308 }
309 return 0;
310}
311
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000312SYS_FUNC(timer_gettime)
Roland McGrath1e356792003-03-30 23:52:28 +0000313{
314 if (entering(tcp)) {
Dmitry V. Levin71178352015-07-16 18:18:09 +0000315 tprintf("%d, ", (int) tcp->u_arg[0]);
Roland McGrath1e356792003-03-30 23:52:28 +0000316 } else {
Dmitry V. Levin22060852015-09-17 16:47:03 +0000317 print_itimerspec(tcp, tcp->u_arg[1]);
Roland McGrath1e356792003-03-30 23:52:28 +0000318 }
319 return 0;
320}
Roland McGrathd83c50b2004-10-06 22:27:43 +0000321
Dmitry V. Levin0ed617b2014-04-25 23:30:54 +0000322#include "xlat/timerfdflags.h"
Roland McGrathe4662342007-08-02 01:25:34 +0000323
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000324SYS_FUNC(timerfd_create)
Roland McGrathde328e62008-05-20 04:56:13 +0000325{
Dmitry V. Levin76c8f662015-07-16 21:07:06 +0000326 printclockname(tcp->u_arg[0]);
327 tprints(", ");
328 printflags(timerfdflags, tcp->u_arg[1], "TFD_???");
329
Dmitry V. Levin07c878a2015-08-02 01:37:19 +0000330 return RVAL_DECODED | RVAL_FD;
Roland McGrathde328e62008-05-20 04:56:13 +0000331}
332
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000333SYS_FUNC(timerfd_settime)
Roland McGrathde328e62008-05-20 04:56:13 +0000334{
Eugene Syromyatnikovb53f5462016-08-22 11:51:16 +0300335 if (entering(tcp)) {
336 printfd(tcp, tcp->u_arg[0]);
337 tprints(", ");
338 printflags(timerfdflags, tcp->u_arg[1], "TFD_???");
339 tprints(", ");
340 print_itimerspec(tcp, tcp->u_arg[2]);
341 tprints(", ");
342 } else {
343 print_itimerspec(tcp, tcp->u_arg[3]);
344 }
345 return 0;
Roland McGrathde328e62008-05-20 04:56:13 +0000346}
347
Dmitry V. Levina0bd3742015-04-07 01:36:50 +0000348SYS_FUNC(timerfd_gettime)
Roland McGrathde328e62008-05-20 04:56:13 +0000349{
350 if (entering(tcp)) {
Dmitry V. Levin31382132011-03-04 05:08:02 +0300351 printfd(tcp, tcp->u_arg[0]);
Denys Vlasenko60fe8c12011-09-01 10:00:28 +0200352 tprints(", ");
Dmitry V. Levin76c8f662015-07-16 21:07:06 +0000353 } else {
Dmitry V. Levin22060852015-09-17 16:47:03 +0000354 print_itimerspec(tcp, tcp->u_arg[1]);
Roland McGrathde328e62008-05-20 04:56:13 +0000355 }
356 return 0;
357}