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 :). --- usr.sbin/procctl/procctl.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'usr.sbin/procctl/procctl.c') 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 @@ -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)); } -- cgit v1.1