summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzont <zont@FreeBSD.org>2012-08-21 14:58:51 +0000
committerzont <zont@FreeBSD.org>2012-08-21 14:58:51 +0000
commit89d46bf90af120da0abc6b1c40f1a4e43d74107e (patch)
tree69ea7c9fbaae6395050d5531ed994a5b8fab0a2d
parentdba327264b592eeaf818773aeb9bc32f3f0dfd98 (diff)
downloadFreeBSD-src-89d46bf90af120da0abc6b1c40f1a4e43d74107e.zip
FreeBSD-src-89d46bf90af120da0abc6b1c40f1a4e43d74107e.tar.gz
- Use pid_t type instead of just int.
Approved by: kib (mentor)
-rw-r--r--usr.bin/truss/extern.h2
-rw-r--r--usr.bin/truss/setup.c6
-rw-r--r--usr.bin/truss/syscalls.c4
-rw-r--r--usr.bin/truss/truss.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/truss/extern.h b/usr.bin/truss/extern.h
index a56a01e..f89582a 100644
--- a/usr.bin/truss/extern.h
+++ b/usr.bin/truss/extern.h
@@ -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);
diff --git a/usr.bin/truss/setup.c b/usr.bin/truss/setup.c
index 5931983..66ad8de 100644
--- a/usr.bin/truss/setup.c
+++ b/usr.bin/truss/setup.c
@@ -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;
diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c
index bcdc6ce..25e012e 100644
--- a/usr.bin/truss/syscalls.c
+++ b/usr.bin/truss/syscalls.c
@@ -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:
diff --git a/usr.bin/truss/truss.h b/usr.bin/truss/truss.h
index 4bf5a55..e708530 100644
--- a/usr.bin/truss/truss.h
+++ b/usr.bin/truss/truss.h
@@ -45,7 +45,7 @@ struct threadinfo
struct trussinfo
{
- int pid;
+ pid_t pid;
int flags;
int pr_why;
int pr_data;
OpenPOWER on IntegriCloud