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

John Baldwin jhb at FreeBSD.org
Sat Mar 18 18:26:57 UTC 2017


Author: jhb
Date: Sat Mar 18 18:26:56 2017
New Revision: 315502
URL: https://svnweb.freebsd.org/changeset/base/315502

Log:
  Decode flock() operation.

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:23:30 2017	(r315501)
+++ head/usr.bin/truss/syscall.h	Sat Mar 18 18:26:56 2017	(r315502)
@@ -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, Fadvice, FileFlags,
+	CapFcntlRights, Fadvice, FileFlags, Flockop,
 
 	CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags,
 	CloudABIFDStat, CloudABIFileStat, CloudABIFileType,

Modified: head/usr.bin/truss/syscalls.c
==============================================================================
--- head/usr.bin/truss/syscalls.c	Sat Mar 18 18:23:30 2017	(r315501)
+++ head/usr.bin/truss/syscalls.c	Sat Mar 18 18:26:56 2017	(r315502)
@@ -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, unsig
 			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);


More information about the svn-src-head mailing list