svn commit: r254314 - stable/8/usr.bin/truss

Mark Johnston markj at FreeBSD.org
Wed Aug 14 02:37:08 UTC 2013


Author: markj
Date: Wed Aug 14 02:37:07 2013
New Revision: 254314
URL: http://svnweb.freebsd.org/changeset/base/254314

Log:
  MFC r253850:
  Properly print arguments to vfork(2) and rfork(2).

Modified:
  stable/8/usr.bin/truss/syscall.h
  stable/8/usr.bin/truss/syscalls.c
Directory Properties:
  stable/8/usr.bin/truss/   (props changed)

Modified: stable/8/usr.bin/truss/syscall.h
==============================================================================
--- stable/8/usr.bin/truss/syscall.h	Wed Aug 14 02:36:21 2013	(r254313)
+++ stable/8/usr.bin/truss/syscall.h	Wed Aug 14 02:37:07 2013	(r254314)
@@ -40,7 +40,7 @@ enum Argtype { None = 1, Hex, Octal, Int
 	Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres,
 	Umtx, Sigset, Sigprocmask, Kevent, Sockdomain, Socktype, Open,
 	Fcntlflag, Rusage, BinString, Shutdown, Resource, Rlimit, Timeval2,
-	Pathconf };
+	Pathconf, Rforkflags };
 
 #define ARG_MASK	0xff
 #define OUT	0x100

Modified: stable/8/usr.bin/truss/syscalls.c
==============================================================================
--- stable/8/usr.bin/truss/syscalls.c	Wed Aug 14 02:36:21 2013	(r254313)
+++ stable/8/usr.bin/truss/syscalls.c	Wed Aug 14 02:37:07 2013	(r254314)
@@ -93,6 +93,9 @@ struct syscall syscalls[] = {
 	{ .name = "fcntl", .ret_type = 1, .nargs = 3,
 	  .args = { { Int, 0 } , { Fcntl, 1 }, { Fcntlflag | OUT, 2 } } },
 	{ .name = "fork", .ret_type = 1, .nargs = 0 },
+	{ .name = "vfork", .ret_type = 1, .nargs = 0 },
+	{ .name = "rfork", .ret_type = 1, .nargs = 1,
+	  .args = { { Rforkflags, 0 } } },
 	{ .name = "getegid", .ret_type = 1, .nargs = 0 },
 	{ .name = "geteuid", .ret_type = 1, .nargs = 0 },
 	{ .name = "getgid", .ret_type = 1, .nargs = 0 },
@@ -367,6 +370,11 @@ static struct xlat pathconf_arg[] = {
 	XEND
 };
 
+static struct xlat rfork_flags[] = {
+	X(RFPROC) X(RFNOWAIT) X(RFFDG) X(RFCFDG) X(RFTHREAD) X(RFMEM)
+	X(RFSIGSHARE) X(RFTSIGZMB) X(RFLINUXTHPN) XEND
+};
+
 #undef X
 #undef XEND
 
@@ -882,6 +890,9 @@ print_arg(struct syscall_args *sc, unsig
 	case Pathconf:
 		tmp = strdup(xlookup(pathconf_arg, args[sc->offset]));
 		break;
+	case Rforkflags:
+		tmp = strdup(xlookup_bits(rfork_flags, args[sc->offset]));
+		break;
 	case Sockaddr: {
 		struct sockaddr_storage ss;
 		char addr[64];


More information about the svn-src-stable-8 mailing list