From 114aeee03b46e0eaabd878baaa000f0ce70b850d Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 8 Jun 2017 08:10:57 +0000 Subject: [PATCH] Decode arguments passed to msync(). --- 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 fe1d470412cb..d99d0c89a321 100644 --- a/usr.bin/truss/syscall.h +++ b/usr.bin/truss/syscall.h @@ -49,7 +49,7 @@ enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHex, Name, Ptr, Stat, Ioctl, CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, Kldsymcmd, Kldunloadflags, Sizet, Madvice, Socklent, Sockprotocol, Sockoptlevel, Sockoptname, Msgflags, CapRights, PUInt, PQuadHex, Acltype, - Extattrnamespace, Minherit, Mlockall, Mountflags, + Extattrnamespace, Minherit, Mlockall, Mountflags, Msync, CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, CloudABIFDStat, CloudABIFileStat, CloudABIFileType, diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index e213bbde84ba..5f9274eaefa9 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -326,6 +326,8 @@ static struct syscall decoded_syscalls[] = { .args = { { Name, 0 }, { Name, 1 }, { Mountflags, 2 }, { Ptr, 3 } } }, { .name = "mprotect", .ret_type = 1, .nargs = 3, .args = { { Ptr, 0 }, { Sizet, 1 }, { Mprot, 2 } } }, + { .name = "msync", .ret_type = 1, .nargs = 3, + .args = { { Ptr, 0 }, { Sizet, 1 }, { Msync, 2 } } }, { .name = "munlock", .ret_type = 1, .nargs = 2, .args = { { Ptr, 0 }, { Sizet, 1 } } }, { .name = "munmap", .ret_type = 1, .nargs = 2, @@ -2118,6 +2120,9 @@ print_arg(struct syscall_args *sc, unsigned long *args, long *retval, case Mountflags: print_mask_arg(sysdecode_mount_flags, fp, args[sc->offset]); break; + case Msync: + print_mask_arg(sysdecode_msync_flags, fp, args[sc->offset]); + break; case CloudABIAdvice: fputs(xlookup(cloudabi_advice, args[sc->offset]), fp);