Decode arguments passed to msync().

This commit is contained in:
John Baldwin 2017-06-08 08:10:57 +00:00
parent 8acc8e78ea
commit 114aeee03b
2 changed files with 6 additions and 1 deletions

View File

@ -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,

View File

@ -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);