truss: Add a decoder for inotify_add_watch_at(2)

MFC after:	3 months
Sponsored by:	Klara, Inc.
This commit is contained in:
Mark Johnston
2025-07-03 19:52:56 +00:00
parent b79bd43f9a
commit 4d08e7815d
2 changed files with 7 additions and 1 deletions
+1
View File
@@ -99,6 +99,7 @@ enum Argtype {
Getfsstatmode,
Idtype,
Ioctl,
Inotifyflags,
Itimerwhich,
Kldsymcmd,
Kldunloadflags,
+6 -1
View File
@@ -31,7 +31,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
/*
* This file has routines used to print out system calls and their
* arguments.
@@ -316,6 +315,9 @@ static const struct syscall_decode decoded_syscalls[] = {
{ Ptr | OUT, 3 }, { Ptr | OUT, 4 } } },
{ .name = "gettimeofday", .ret_type = 1, .nargs = 2,
.args = { { Timeval | OUT, 0 }, { Ptr, 1 } } },
{ .name = "inotify_add_watch_at", .ret_type = 1, .nargs = 4,
.args = { { Int, 0 }, { Atfd, 1 }, { Name | IN, 2 },
{ Inotifyflags, 3 } } },
{ .name = "ioctl", .ret_type = 1, .nargs = 3,
.args = { { Int, 0 }, { Ioctl, 1 }, { Ptr, 2 } } },
{ .name = "kevent", .ret_type = 1, .nargs = 6,
@@ -2447,6 +2449,9 @@ print_arg(struct syscall_arg *sc, syscallarg_t *args, syscallarg_t *retval,
print_integer_arg(sysdecode_getfsstat_mode, fp,
args[sc->offset]);
break;
case Inotifyflags:
print_mask_arg(sysdecode_inotifyflags, fp, args[sc->offset]);
break;
case Itimerwhich:
print_integer_arg(sysdecode_itimer, fp, args[sc->offset]);
break;