]> granicus.if.org Git - strace/blob - inotify.c
tests: fix format warnings on x32
[strace] / inotify.c
1 /*
2  * Copyright (c) 2006 Bernhard Kaindl <bk@suse.de>
3  * Copyright (c) 2006-2018 Dmitry V. Levin <ldv@altlinux.org>
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: LGPL-2.1-or-later
7  */
8
9 #include "defs.h"
10 #include <fcntl.h>
11
12 #include "xlat/inotify_flags.h"
13 #include "xlat/inotify_init_flags.h"
14
15 SYS_FUNC(inotify_add_watch)
16 {
17         /* file descriptor */
18         printfd(tcp, tcp->u_arg[0]);
19         tprints(", ");
20         /* pathname */
21         printpath(tcp, tcp->u_arg[1]);
22         tprints(", ");
23         /* mask */
24         printflags(inotify_flags, tcp->u_arg[2], "IN_???");
25
26         return RVAL_DECODED;
27 }
28
29 SYS_FUNC(inotify_rm_watch)
30 {
31         /* file descriptor */
32         printfd(tcp, tcp->u_arg[0]);
33         /* watch descriptor */
34         tprintf(", %d", (int) tcp->u_arg[1]);
35
36         return RVAL_DECODED;
37 }
38
39 SYS_FUNC(inotify_init)
40 {
41         return RVAL_DECODED | RVAL_FD;
42 }
43
44 SYS_FUNC(inotify_init1)
45 {
46         printflags(inotify_init_flags, tcp->u_arg[0], "IN_???");
47
48         return RVAL_DECODED | RVAL_FD;
49 }