Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Mar 2017 00:31:21 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r315524 - head/usr.bin/truss
Message-ID:  <201703190031.v2J0VLrM021286@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Sun Mar 19 00:31:21 2017
New Revision: 315524
URL: https://svnweb.freebsd.org/changeset/base/315524

Log:
  Decode arguments to madvise().

Modified:
  head/usr.bin/truss/syscall.h
  head/usr.bin/truss/syscalls.c

Modified: head/usr.bin/truss/syscall.h
==============================================================================
--- head/usr.bin/truss/syscall.h	Sun Mar 19 00:27:07 2017	(r315523)
+++ head/usr.bin/truss/syscall.h	Sun Mar 19 00:31:21 2017	(r315524)
@@ -46,7 +46,7 @@ enum Argtype { None = 1, Hex, Octal, Int
 	LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long,
 	Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2,
 	CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, Kldsymcmd,
-	Kldunloadflags, Sizet,
+	Kldunloadflags, Sizet, Madvice,
 
 	CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags,
 	CloudABIFDStat, CloudABIFileStat, CloudABIFileType,

Modified: head/usr.bin/truss/syscalls.c
==============================================================================
--- head/usr.bin/truss/syscalls.c	Sun Mar 19 00:27:07 2017	(r315523)
+++ head/usr.bin/truss/syscalls.c	Sun Mar 19 00:31:21 2017	(r315524)
@@ -218,6 +218,8 @@ static struct syscall decoded_syscalls[]
 	  .args = { { Name | IN, 0 }, { Stat | OUT, 1 } } },
 	{ .name = "lutimes", .ret_type = 1, .nargs = 2,
 	  .args = { { Name | IN, 0 }, { Timeval2 | IN, 1 } } },
+	{ .name = "madvise", .ret_type = 1, .nargs = 3,
+	  .args = { { Ptr, 0 }, { Sizet, 1 }, { Madvice, 2 } } },
 	{ .name = "mkdir", .ret_type = 1, .nargs = 2,
 	  .args = { { Name, 0 }, { Octal, 1 } } },
 	{ .name = "mkdirat", .ret_type = 1, .nargs = 3,
@@ -1907,6 +1909,9 @@ print_arg(struct syscall_args *sc, unsig
 		print_integer_arg(sysdecode_kldunload_flags, fp,
 		    args[sc->offset]);
 		break;
+	case Madvice:
+		print_integer_arg(sysdecode_madvice, fp, args[sc->offset]);
+		break;
 
 	case CloudABIAdvice:
 		fputs(xlookup(cloudabi_advice, args[sc->offset]), fp);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703190031.v2J0VLrM021286>