From: deraadt Date: Wed, 21 Jul 2010 18:43:59 +0000 (+0000) Subject: No need for read/write functions, just use enodev like all the other X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=117286bee276b154a291c362c91336443a022b8e;p=openbsd No need for read/write functions, just use enodev like all the other things things do ok nicm --- diff --git a/sys/crypto/cryptodev.c b/sys/crypto/cryptodev.c index 6b81461cde7..7796e6ff3c7 100644 --- a/sys/crypto/cryptodev.c +++ b/sys/crypto/cryptodev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cryptodev.c,v 1.72 2010/07/20 09:06:38 matthew Exp $ */ +/* $OpenBSD: cryptodev.c,v 1.73 2010/07/21 18:44:01 deraadt Exp $ */ /* * Copyright (c) 2001 Theo de Raadt @@ -650,18 +650,6 @@ cryptoclose(dev_t dev, int flag, int mode, struct proc *p) return (0); } -int -cryptoread(dev_t dev, struct uio *uio, int ioflag) -{ - return (EIO); -} - -int -cryptowrite(dev_t dev, struct uio *uio, int ioflag) -{ - return (EIO); -} - int cryptoioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { @@ -694,12 +682,6 @@ cryptoioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) return (error); } -int -cryptopoll(dev_t dev, int events, struct proc *p) -{ - return (seltrue(dev, events, p)); -} - struct csession * csefind(struct fcrypt *fcr, u_int ses) { diff --git a/sys/dev/systrace.c b/sys/dev/systrace.c index 72db52f030f..ba219bc732b 100644 --- a/sys/dev/systrace.c +++ b/sys/dev/systrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: systrace.c,v 1.52 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: systrace.c,v 1.53 2010/07/21 18:44:01 deraadt Exp $ */ /* * Copyright 2002 Niels Provos * All rights reserved. @@ -57,10 +57,7 @@ void systraceattach(int); int systraceopen(dev_t, int, int, struct proc *); int systraceclose(dev_t, int, int, struct proc *); -int systraceread(dev_t, struct uio *, int); -int systracewrite(dev_t, struct uio *, int); int systraceioctl(dev_t, u_long, caddr_t, int, struct proc *); -int systracepoll(dev_t, int, struct proc *); uid_t systrace_seteuid(struct proc *, uid_t); gid_t systrace_setegid(struct proc *, gid_t); @@ -532,24 +529,6 @@ systraceclose(dev, flag, mode, p) return (0); } -int -systraceread(dev, uio, ioflag) - dev_t dev; - struct uio *uio; - int ioflag; -{ - return (EIO); -} - -int -systracewrite(dev, uio, ioflag) - dev_t dev; - struct uio *uio; - int ioflag; -{ - return (EIO); -} - int systraceioctl(dev, cmd, data, flag, p) dev_t dev; @@ -595,15 +574,6 @@ systraceioctl(dev, cmd, data, flag, p) return (error); } -int -systracepoll(dev, events, p) - dev_t dev; - int events; - struct proc *p; -{ - return (seltrue(dev, events, p)); -} - void systrace_wakeup(struct fsystrace *fst) { diff --git a/sys/sys/conf.h b/sys/sys/conf.h index c94e98b8cd7..9afdfd250e9 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.102 2010/07/18 21:01:06 oga Exp $ */ +/* $OpenBSD: conf.h,v 1.103 2010/07/21 18:43:59 deraadt Exp $ */ /* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */ /*- @@ -247,14 +247,14 @@ extern struct cdevsw cdevsw[]; /* open, close, read, write, ioctl, mmap */ #define cdev_crypto_init(c,n) { \ - dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \ - dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \ + dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \ + (dev_type_write((*))) enodev, dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \ 0, selfalse, (dev_type_mmap((*))) enodev } /* open, close, read, write, ioctl */ #define cdev_systrace_init(c,n) { \ - dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \ - dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \ + dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \ + (dev_type_write((*))) enodev, dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \ 0, selfalse, (dev_type_mmap((*))) enodev } /* open, close, read, write, ioctl, tty, poll, kqfilter */