summaryrefslogtreecommitdiffstats
path: root/usr.sbin/procctl/procctl.c
diff options
context:
space:
mode:
authorsef <sef@FreeBSD.org>1997-12-13 03:13:49 +0000
committersef <sef@FreeBSD.org>1997-12-13 03:13:49 +0000
commitf13ddbc86500ce893f62460b62d775089a14aba0 (patch)
tree2ef0d8080b077044d2a0ab73a9b9d1b08d002334 /usr.sbin/procctl/procctl.c
parentb51dc6a0ad3ce435d5255b72124d2220a345c748 (diff)
downloadFreeBSD-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 'usr.sbin/procctl/procctl.c')
-rw-r--r--usr.sbin/procctl/procctl.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/procctl/procctl.c b/usr.sbin/procctl/procctl.c
index 2578c47..ae3894b 100644
--- a/usr.sbin/procctl/procctl.c
+++ b/usr.sbin/procctl/procctl.c
@@ -7,7 +7,7 @@
* for some annoying circumstances.)
*/
/*
- * $Id$
+ * $Id: procctl.c,v 1.1 1997/12/06 04:19:09 sef Exp $
*/
#include <stdio.h>
@@ -39,13 +39,11 @@ main(int ac, char **av) {
av[0], av[i], strerror(errno));
continue;
}
- mask = ~0;
- if (ioctl(fd, PIOCBIC, &mask) == -1) {
+ if (ioctl(fd, PIOCBIC, ~0) == -1) {
fprintf(stderr, "%s: cannot clear process %s's event mask: %s\n",
av[0], av[i], strerror(errno));
}
- mask = 0;
- if (ioctl(fd, PIOCCONT, &mask) == -1 && errno != EINVAL) {
+ if (ioctl(fd, PIOCCONT, 0) == -1 && errno != EINVAL) {
fprintf(stderr, "%s: cannot continue process %s: %s\n",
av[0], av[i], strerror(errno));
}
OpenPOWER on IntegriCloud