Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 2017 15:41:16 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        Warner Losh <imp@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r320279 - head/usr.bin/truss
Message-ID:  <6d940202-48a1-1c1f-ae36-d9c61def9560@FreeBSD.org>
In-Reply-To: <201706231806.v5NI6kh4052293@repo.freebsd.org>
References:  <201706231806.v5NI6kh4052293@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 6/23/17 2:06 PM, Warner Losh wrote:
> Author: imp
> Date: Fri Jun 23 18:06:46 2017
> New Revision: 320279
> URL: https://svnweb.freebsd.org/changeset/base/320279
> 
> Log:
>   Decode FreeBSD 11 compat stat, fstat and lstat calls.
> 
> 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	Fri Jun 23 18:06:20 2017	(r320278)
> +++ head/usr.bin/truss/syscall.h	Fri Jun 23 18:06:46 2017	(r320279)
> @@ -10,6 +10,7 @@
>   * BinString -- pointer to an array of chars, printed via strvisx().
>   * Ptr -- pointer to some unspecified structure.  Just print as hex for now.
>   * Stat -- a pointer to a stat buffer.  Prints a couple fields.
> + * Stat11 -- a pointer to a freebsd 11 stat buffer.  Prints a couple fields.
>   * StatFs -- a pointer to a statfs buffer.  Prints a few fields.
>   * Ioctl -- an ioctl command.  Woefully limited.
>   * Quad -- a double-word value.  e.g., lseek(int, offset_t, int)
> @@ -38,7 +39,7 @@
>   * $FreeBSD$
>   */
>  
> -enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHex, Name, Ptr, Stat, Ioctl,
> +enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHex, Name, Ptr, Stat, Stat11, Ioctl,
>  	Quad, Signal, Sockaddr, StringArray, Timespec, Timeval, Itimerval,
>  	Pollfd, Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres,
>  	Sigset, Sigprocmask, StatFs, Kevent, Sockdomain, Socktype, Open,
> 
> Modified: head/usr.bin/truss/syscalls.c
> ==============================================================================
> --- head/usr.bin/truss/syscalls.c	Fri Jun 23 18:06:20 2017	(r320278)
> +++ head/usr.bin/truss/syscalls.c	Fri Jun 23 18:06:46 2017	(r320279)
> @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
>  #include <sys/ptrace.h>
>  #include <sys/resource.h>
>  #include <sys/socket.h>
> +#define _WANT_FREEBSD11_STAT
>  #include <sys/stat.h>
>  #include <sys/un.h>
>  #include <sys/wait.h>
> @@ -215,6 +216,14 @@ static struct syscall decoded_syscalls[] = {
>  	  .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } },
>  	{ .name = "flock", .ret_type = 1, .nargs = 2,
>  	  .args = { { Int, 0 }, { Flockop, 1 } } },
> +	{ .name = "compat11.fstat", .ret_type = 1, .nargs = 2,
> +	  .args = { { Int, 0 }, { Stat11 | OUT, 1 } } },
> +	{ .name = "compat11.lstat", .ret_type = 1, .nargs = 2,
> +	  .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } },
> +	{ .name = "compat11.stat", .ret_type = 1, .nargs = 2,
> +	  .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } },
> +	{ .name = "compat11.stat", .ret_type = 1, .nargs = 2,
> +	  .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } },

This list is sorted alphabetically by system call name, and compat11.stat is
listed twice.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6d940202-48a1-1c1f-ae36-d9c61def9560>