Index: sys/fs/procfs/procfs_ioctl.c =================================================================== RCS file: /home/ncvs/src/sys/fs/procfs/procfs_ioctl.c,v retrieving revision 1.10 diff -u -r1.10 procfs_ioctl.c --- sys/fs/procfs/procfs_ioctl.c 7 Dec 2003 17:40:00 -0000 1.10 +++ sys/fs/procfs/procfs_ioctl.c 28 Nov 2004 06:48:03 -0000 @@ -46,8 +46,8 @@ procfs_ioctl(PFS_IOCTL_ARGS) { struct procfs_status *ps; - int error, flags, sig; - + int error; + unsigned int flags, sig; PROC_LOCK(p); error = 0; switch (cmd) { Index: sys/sys/param.h =================================================================== RCS file: /home/ncvs/src/sys/sys/param.h,v retrieving revision 1.218 diff -u -r1.218 param.h --- sys/sys/param.h 4 Nov 2004 08:38:34 -0000 1.218 +++ sys/sys/param.h 28 Nov 2004 06:48:05 -0000 @@ -57,7 +57,7 @@ * is created, otherwise 1. */ #undef __FreeBSD_version -#define __FreeBSD_version 600006 /* Master, propagated to newvers */ +#define __FreeBSD_version 600007 /* Master, propagated to newvers */ #ifndef LOCORE #include Index: sys/sys/pioctl.h =================================================================== RCS file: /home/ncvs/src/sys/sys/pioctl.h,v retrieving revision 1.12 diff -u -r1.12 pioctl.h --- sys/sys/pioctl.h 4 Aug 2002 01:06:58 -0000 1.12 +++ sys/sys/pioctl.h 28 Nov 2004 06:48:05 -0000 @@ -49,12 +49,12 @@ unsigned long val; /* Any extra data */ }; -# define PIOCBIS _IOC(IOC_IN, 'p', 1, 0) /* Set event flag */ -# define PIOCBIC _IOC(IOC_IN, 'p', 2, 0) /* Clear event flag */ -# define PIOCSFL _IOC(IOC_IN, 'p', 3, 0) /* Set flags */ +# define PIOCBIS _IOW('p', 1, unsigned int) /* Set event flag */ +# define PIOCBIC _IOW('p', 2, unsigned int) /* Clear event flag */ +# define PIOCSFL _IOW('p', 3, unsigned int) /* Set flags */ /* wait for proc to stop */ # define PIOCWAIT _IOR('p', 4, struct procfs_status) -# define PIOCCONT _IOC(IOC_IN, 'p', 5, 0) /* Continue a process */ +# define PIOCCONT _IOW('p', 5, unsigned int) /* Continue a process */ /* Get proc status */ # define PIOCSTATUS _IOR('p', 6, struct procfs_status) # define PIOCGFL _IOR('p', 7, unsigned int) /* Get flags */ Index: usr.bin/truss/extern.h =================================================================== RCS file: /home/ncvs/src/usr.bin/truss/extern.h,v retrieving revision 1.9 diff -u -r1.9 extern.h --- usr.bin/truss/extern.h 17 Jul 2004 19:19:36 -0000 1.9 +++ usr.bin/truss/extern.h 28 Nov 2004 06:48:06 -0000 @@ -32,7 +32,7 @@ */ extern int setup_and_wait(char **); -extern int start_tracing(int, int, int); +extern int start_tracing(int, unsigned int, int); extern void restore_proc(int); extern const char *ioctlname(register_t val); extern char *strsig(int sig); Index: usr.bin/truss/main.c =================================================================== RCS file: /home/ncvs/src/usr.bin/truss/main.c,v retrieving revision 1.38 diff -u -r1.38 main.c --- usr.bin/truss/main.c 17 Jul 2004 19:19:36 -0000 1.38 +++ usr.bin/truss/main.c 28 Nov 2004 06:48:07 -0000 @@ -322,7 +322,7 @@ break; } } - if (ioctl(Procfd, PIOCCONT, val) == -1) { + if (ioctl(Procfd, PIOCCONT, &val) == -1) { if (kill(trussinfo->pid, 0) == -1 && errno == ESRCH) break; else Index: usr.bin/truss/setup.c =================================================================== RCS file: /home/ncvs/src/usr.bin/truss/setup.c,v retrieving revision 1.19 diff -u -r1.19 setup.c --- usr.bin/truss/setup.c 7 Jan 2004 14:29:45 -0000 1.19 +++ usr.bin/truss/setup.c 28 Nov 2004 06:48:08 -0000 @@ -54,7 +54,7 @@ #include "truss.h" #include "extern.h" -static int evflags = 0; +static unsigned int evflags = 0; /* * setup_and_wait() is called to start a process. All it really does @@ -69,19 +69,19 @@ char buf[32]; int fd; int pid; - int flags; + unsigned int flags; pid = fork(); if (pid == -1) { err(1, "fork failed"); } if (pid == 0) { /* Child */ - int mask = S_EXEC | S_EXIT; + unsigned int mask = S_EXEC | S_EXIT; fd = open("/proc/curproc/mem", O_WRONLY); if (fd == -1) err(2, "cannot open /proc/curproc/mem"); fcntl(fd, F_SETFD, 1); - if (ioctl(fd, PIOCBIS, mask) == -1) + if (ioctl(fd, PIOCBIS, &mask) == -1) err(3, "PIOCBIS"); flags = PF_LINGER; /* @@ -89,11 +89,11 @@ * process on last close; normally, this is the behaviour * we want. */ - if (ioctl(fd, PIOCSFL, flags) == -1) + if (ioctl(fd, PIOCSFL, &flags) == -1) warn("cannot set PF_LINGER"); execvp(command[0], command); mask = ~0; - ioctl(fd, PIOCBIC, ~0); + ioctl(fd, PIOCBIC, &mask); err(4, "execvp %s", command[0]); } /* Only in the parent here */ @@ -128,7 +128,7 @@ */ int -start_tracing(int pid, int eventflags, int flags) { +start_tracing(int pid, unsigned int eventflags, int flags) { int fd; char buf[32]; struct procfs_status tmp; @@ -151,7 +151,7 @@ } evflags = tmp.events; - if (ioctl(fd, PIOCBIS, eventflags) == -1) + if (ioctl(fd, PIOCBIS, &eventflags) == -1) err(9, "cannot set procfs event bit mask"); /* @@ -160,7 +160,7 @@ * needs to be woken up via procctl. */ - if (ioctl(fd, PIOCSFL, flags) == -1) + if (ioctl(fd, PIOCSFL, &flags) == -1) warn("cannot clear PF_LINGER"); return fd; @@ -174,9 +174,9 @@ */ void restore_proc(int signo __unused) { - - ioctl(Procfd, PIOCBIC, ~0); + unsigned int flags = ~0; + ioctl(Procfd, PIOCBIC, &flags); if (evflags) - ioctl(Procfd, PIOCBIS, evflags); + ioctl(Procfd, PIOCBIS, &evflags); exit(0); }