Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2012 14:58:52 +0000 (UTC)
From:      Andrey Zonov <zont@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r239501 - head/usr.bin/truss
Message-ID:  <201208211458.q7LEwqOU054149@svn.freebsd.org>

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



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