svn commit: r315497 - head/usr.bin/truss

John Baldwin jhb at FreeBSD.org
Sat Mar 18 18:12:10 UTC 2017


Author: jhb
Date: Sat Mar 18 18:12:09 2017
New Revision: 315497
URL: https://svnweb.freebsd.org/changeset/base/315497

Log:
  Decode arguments passed to posix_fadvise().

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	Sat Mar 18 18:10:02 2017	(r315496)
+++ head/usr.bin/truss/syscall.h	Sat Mar 18 18:12:09 2017	(r315497)
@@ -45,7 +45,7 @@ enum Argtype { None = 1, Hex, Octal, Int
 	Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl,
 	LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long,
 	Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2,
-	CapFcntlRights,
+	CapFcntlRights, Fadvice,
 
 	CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags,
 	CloudABIFDStat, CloudABIFileStat, CloudABIFileType,

Modified: head/usr.bin/truss/syscalls.c
==============================================================================
--- head/usr.bin/truss/syscalls.c	Sat Mar 18 18:10:02 2017	(r315496)
+++ head/usr.bin/truss/syscalls.c	Sat Mar 18 18:12:09 2017	(r315497)
@@ -243,6 +243,9 @@ static struct syscall decoded_syscalls[]
 	  .args = { { Ptr, 0 }, { Pipe2, 1 } } },
 	{ .name = "poll", .ret_type = 1, .nargs = 3,
 	  .args = { { Pollfd, 0 }, { Int, 1 }, { Int, 2 } } },
+	{ .name = "posix_fadvise", .ret_type = 1, .nargs = 4,
+	  .args = { { Int, 0 }, { QuadHex, 1 }, { QuadHex, 2 },
+		    { Fadvice, 3 } } },
 	{ .name = "posix_openpt", .ret_type = 1, .nargs = 1,
 	  .args = { { Open, 0 } } },
 	{ .name = "procctl", .ret_type = 1, .nargs = 4,
@@ -1862,6 +1865,9 @@ print_arg(struct syscall_args *sc, unsig
 		print_mask_arg32(sysdecode_cap_fcntlrights, fp, rights);
 		break;
 	}
+	case Fadvice:
+		print_integer_arg(sysdecode_fadvice, fp, args[sc->offset]);
+		break;
 
 	case CloudABIAdvice:
 		fputs(xlookup(cloudabi_advice, args[sc->offset]), fp);


More information about the svn-src-all mailing list