Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jun 2017 08:07:51 +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: r319688 - head/usr.bin/truss
Message-ID:  <201706080807.v5887pqC064505@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Thu Jun  8 08:07:51 2017
New Revision: 319688
URL: https://svnweb.freebsd.org/changeset/base/319688

Log:
  Decode flags passed to mount(), nmount(), and unmount().

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	Thu Jun  8 06:37:11 2017	(r319687)
+++ head/usr.bin/truss/syscall.h	Thu Jun  8 08:07:51 2017	(r319688)
@@ -49,7 +49,7 @@ enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHe
 	CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, Kldsymcmd,
 	Kldunloadflags, Sizet, Madvice, Socklent, Sockprotocol, Sockoptlevel,
 	Sockoptname, Msgflags, CapRights, PUInt, PQuadHex, Acltype,
-	Extattrnamespace, Minherit, Mlockall,
+	Extattrnamespace, Minherit, Mlockall, Mountflags,
 
 	CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags,
 	CloudABIFDStat, CloudABIFileStat, CloudABIFileType,

Modified: head/usr.bin/truss/syscalls.c
==============================================================================
--- head/usr.bin/truss/syscalls.c	Thu Jun  8 06:37:11 2017	(r319687)
+++ head/usr.bin/truss/syscalls.c	Thu Jun  8 08:07:51 2017	(r319688)
@@ -323,7 +323,7 @@ static struct syscall decoded_syscalls[] = {
 	{ .name = "modfind", .ret_type = 1, .nargs = 1,
 	  .args = { { Name | IN, 0 } } },
 	{ .name = "mount", .ret_type = 1, .nargs = 4,
-	  .args = { { Name, 0 }, { Name, 1 }, { Int, 2 }, { Ptr, 3 } } },
+	  .args = { { Name, 0 }, { Name, 1 }, { Mountflags, 2 }, { Ptr, 3 } } },
 	{ .name = "mprotect", .ret_type = 1, .nargs = 3,
 	  .args = { { Ptr, 0 }, { Sizet, 1 }, { Mprot, 2 } } },
 	{ .name = "munlock", .ret_type = 1, .nargs = 2,
@@ -332,6 +332,8 @@ static struct syscall decoded_syscalls[] = {
 	  .args = { { Ptr, 0 }, { Sizet, 1 } } },
 	{ .name = "nanosleep", .ret_type = 1, .nargs = 1,
 	  .args = { { Timespec, 0 } } },
+	{ .name = "nmount", .ret_type = 1, .nargs = 3,
+	  .args = { { Ptr, 0 }, { UInt, 1 }, { Mountflags, 2 } } },
 	{ .name = "open", .ret_type = 1, .nargs = 3,
 	  .args = { { Name | IN, 0 }, { Open, 1 }, { Octal, 2 } } },
 	{ .name = "openat", .ret_type = 1, .nargs = 4,
@@ -452,7 +454,7 @@ static struct syscall decoded_syscalls[] = {
 	{ .name = "unlinkat", .ret_type = 1, .nargs = 3,
 	  .args = { { Atfd, 0 }, { Name, 1 }, { Atflags, 2 } } },
 	{ .name = "unmount", .ret_type = 1, .nargs = 2,
-	  .args = { { Name, 0 }, { Int, 1 } } },
+	  .args = { { Name, 0 }, { Mountflags, 1 } } },
 	{ .name = "utimensat", .ret_type = 1, .nargs = 4,
 	  .args = { { Atfd, 0 }, { Name | IN, 1 }, { Timespec2 | IN, 2 },
 		    { Atflags, 3 } } },
@@ -2112,6 +2114,9 @@ print_arg(struct syscall_args *sc, unsigned long *args
 		break;
 	case Mlockall:
 		print_mask_arg(sysdecode_mlockall_flags, fp, args[sc->offset]);
+		break;
+	case Mountflags:
+		print_mask_arg(sysdecode_mount_flags, fp, args[sc->offset]);
 		break;
 
 	case CloudABIAdvice:



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