diff options
author | sef <sef@FreeBSD.org> | 1997-12-13 03:13:49 +0000 |
---|---|---|
committer | sef <sef@FreeBSD.org> | 1997-12-13 03:13:49 +0000 |
commit | f13ddbc86500ce893f62460b62d775089a14aba0 (patch) | |
tree | 2ef0d8080b077044d2a0ab73a9b9d1b08d002334 /sys/fs/procfs | |
parent | b51dc6a0ad3ce435d5255b72124d2220a345c748 (diff) | |
download | FreeBSD-src-f13ddbc86500ce893f62460b62d775089a14aba0.zip FreeBSD-src-f13ddbc86500ce893f62460b62d775089a14aba0.tar.gz |
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 :).
Diffstat (limited to 'sys/fs/procfs')
-rw-r--r-- | sys/fs/procfs/procfs_vnops.c | 7 |
1 files changed, 4 insertions, 3 deletions
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); |