]> granicus.if.org Git - strace/blob - inotify_ioctl.c
Add support for long options
[strace] / inotify_ioctl.c
1 /*
2  * Copyright (c) 2018 The strace developers.
3  * All rights reserved.
4  *
5  * SPDX-License-Identifier: LGPL-2.1-or-later
6  */
7
8 #include "defs.h"
9
10 #include <linux/ioctl.h>
11
12 #ifndef INOTIFY_IOC_SETNEXTWD
13 # define INOTIFY_IOC_SETNEXTWD  _IOW('I', 0, int32_t)
14 #endif
15
16 int
17 inotify_ioctl(struct tcb *const tcp, const unsigned int code,
18                const kernel_ulong_t arg)
19 {
20         switch (code) {
21         case INOTIFY_IOC_SETNEXTWD:
22                 tprintf(", %d", (int) arg);
23
24                 return RVAL_IOCTL_DECODED;
25         }
26
27         return RVAL_DECODED;
28 }