From owner-svn-src-head@FreeBSD.ORG Tue Aug 21 14:58:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA8C5106564A; Tue, 21 Aug 2012 14:58:52 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C5CE8FC08; Tue, 21 Aug 2012 14:58:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LEwqHH054154; Tue, 21 Aug 2012 14:58:52 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LEwqOU054149; Tue, 21 Aug 2012 14:58:52 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201208211458.q7LEwqOU054149@svn.freebsd.org> From: Andrey Zonov Date: Tue, 21 Aug 2012 14:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239501 - head/usr.bin/truss X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 14:58:52 -0000 Author: zont Date: Tue Aug 21 14:58:51 2012 New Revision: 239501 URL: http://svn.freebsd.org/changeset/base/239501 Log: - Use pid_t type instead of just int. Approved by: kib (mentor) Modified: head/usr.bin/truss/extern.h head/usr.bin/truss/setup.c head/usr.bin/truss/syscalls.c head/usr.bin/truss/truss.h Modified: head/usr.bin/truss/extern.h ============================================================================== --- head/usr.bin/truss/extern.h Tue Aug 21 13:46:46 2012 (r239500) +++ head/usr.bin/truss/extern.h Tue Aug 21 14:58:51 2012 (r239501) @@ -32,7 +32,7 @@ */ extern int setup_and_wait(char **); -extern int start_tracing(int); +extern int start_tracing(pid_t); extern void restore_proc(int); extern void waitevent(struct trussinfo *); extern const char *ioctlname(unsigned long val); Modified: head/usr.bin/truss/setup.c ============================================================================== --- head/usr.bin/truss/setup.c Tue Aug 21 13:46:46 2012 (r239500) +++ head/usr.bin/truss/setup.c Tue Aug 21 14:58:51 2012 (r239501) @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #include "truss.h" #include "extern.h" -static int child_pid; +static pid_t child_pid; /* * setup_and_wait() is called to start a process. All it really does @@ -69,7 +69,7 @@ static int child_pid; int setup_and_wait(char *command[]) { - int pid; + pid_t pid; int waitval; pid = vfork(); @@ -100,7 +100,7 @@ setup_and_wait(char *command[]) */ int -start_tracing(int pid) +start_tracing(pid_t pid) { int waitval; int ret; Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Tue Aug 21 13:46:46 2012 (r239500) +++ head/usr.bin/truss/syscalls.c Tue Aug 21 14:58:51 2012 (r239501) @@ -464,7 +464,7 @@ get_syscall(const char *name) */ static int -get_struct(int pid, void *offset, void *buf, int len) +get_struct(pid_t pid, void *offset, void *buf, int len) { struct ptrace_io_desc iorequest; @@ -539,7 +539,7 @@ char * print_arg(struct syscall_args *sc, unsigned long *args, long retval, struct trussinfo *trussinfo) { char *tmp = NULL; - int pid = trussinfo->pid; + pid_t pid = trussinfo->pid; switch (sc->type & ARG_MASK) { case Hex: Modified: head/usr.bin/truss/truss.h ============================================================================== --- head/usr.bin/truss/truss.h Tue Aug 21 13:46:46 2012 (r239500) +++ head/usr.bin/truss/truss.h Tue Aug 21 14:58:51 2012 (r239501) @@ -45,7 +45,7 @@ struct threadinfo struct trussinfo { - int pid; + pid_t pid; int flags; int pr_why; int pr_data;