Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Mar 2017 18:26:56 +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: r315502 - head/usr.bin/truss
Message-ID:  <201703181826.v2IIQuKB070950@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



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