aboutsummaryrefslogtreecommitdiff
path: root/sys/miscfs/procfs/procfs_vnops.c
diff options
context:
space:
mode:
authorSean Eric Fagan <sef@FreeBSD.org>1997-12-13 03:13:49 +0000
committerSean Eric Fagan <sef@FreeBSD.org>1997-12-13 03:13:49 +0000
commitd7b7dcba41ac3c46e7ccd2efb837c560a867cba9 (patch)
treeb2c39c799eb94ba334869469a0e95ced5c40ff7c /sys/miscfs/procfs/procfs_vnops.c
parentbcc332bdb0fffe5e7900c7e26954f062c95b0c23 (diff)
downloadsrc-d7b7dcba41ac3c46e7ccd2efb837c560a867cba9.tar.gz
src-d7b7dcba41ac3c46e7ccd2efb837c560a867cba9.zip
Change the ioctls for procfs around a bit; in particular, whever possible,
change from ioctl(fd, PIOC<foo>, &i); to ioctl(fd, PIOC<foo>, 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 :).
Notes
Notes: svn path=/head/; revision=31691
Diffstat (limited to 'sys/miscfs/procfs/procfs_vnops.c')
-rw-r--r--sys/miscfs/procfs/procfs_vnops.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c
index f660f3a213d7..9a40ea3bd38d 100644
--- a/sys/miscfs/procfs/procfs_vnops.c
+++ b/sys/miscfs/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);