From f13ddbc86500ce893f62460b62d775089a14aba0 Mon Sep 17 00:00:00 2001 From: sef Date: Sat, 13 Dec 1997 03:13:49 +0000 Subject: Change the ioctls for procfs around a bit; in particular, whever possible, change from ioctl(fd, PIOC, &i); to ioctl(fd, PIOC, i); This is going from the _IOW to _IO ioctl macro. The kernel, procctl, and truss must be in synch for it all to work (not doing so will get errors about inappropriate ioctl's, fortunately). Hopefully I didn't forget anything :). --- sys/fs/procfs/procfs_vnops.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/fs/procfs') diff --git a/sys/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c index f660f3a..9a40ea3 100644 --- a/sys/fs/procfs/procfs_vnops.c +++ b/sys/fs/procfs/procfs_vnops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95 * - * $Id: procfs_vnops.c,v 1.46 1997/12/08 22:09:24 sef Exp $ + * $Id: procfs_vnops.c,v 1.47 1997/12/12 03:33:43 sef Exp $ */ /* @@ -243,8 +243,9 @@ procfs_ioctl(ap) break; case PIOCSFL: procp->p_pfsflags = (unsigned char)*(unsigned int*)ap->a_data; - *(unsigned int*)ap->a_data = procp->p_stops; break; + case PIOCGFL: + *(unsigned int*)ap->a_data = (unsigned int)procp->p_pfsflags; case PIOCSTATUS: psp = (struct procfs_status *)ap->a_data; psp->state = (procp->p_step == 0); @@ -273,7 +274,7 @@ procfs_ioctl(ap) case PIOCCONT: /* Restart a proc */ if (procp->p_step == 0) return EINVAL; /* Can only start a stopped process */ - if (ap->a_data && (signo = *(int*)ap->a_data)) { + if (signo = *(int*)ap->a_data) { if (signo >= NSIG || signo <= 0) return EINVAL; psignal(procp, signo); -- cgit v1.1