From dd92181f600d3456592cb97c87c76cea38d03569 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Sat, 18 Mar 2017 18:26:56 +0000 Subject: [PATCH] Decode flock() operation. --- usr.bin/truss/syscall.h | 2 +- usr.bin/truss/syscalls.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/usr.bin/truss/syscall.h b/usr.bin/truss/syscall.h index 878e85f7fc6a..675256f24d35 100644 --- a/usr.bin/truss/syscall.h +++ b/usr.bin/truss/syscall.h @@ -45,7 +45,7 @@ enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHex, Name, Ptr, Stat, Ioctl, Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long, Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, - CapFcntlRights, Fadvice, FileFlags, + CapFcntlRights, Fadvice, FileFlags, Flockop, CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, CloudABIFDStat, CloudABIFileStat, CloudABIFileType, diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index 7207ba68f6f6..eb5a7546122f 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -141,6 +141,8 @@ static struct syscall decoded_syscalls[] = { { Atflags, 4 } } }, { .name = "fcntl", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } }, + { .name = "flock", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Flockop, 1 } } }, { .name = "fstat", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Stat | OUT, 1 } } }, { .name = "fstatat", .ret_type = 1, .nargs = 4, @@ -1882,6 +1884,9 @@ print_arg(struct syscall_args *sc, unsigned long *args, long *retval, fprintf(fp, "|0x%x", rem); break; } + case Flockop: + print_mask_arg(sysdecode_flock_operation, fp, args[sc->offset]); + break; case CloudABIAdvice: fputs(xlookup(cloudabi_advice, args[sc->offset]), fp);