diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-07-21 18:48:02 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-07-21 18:48:02 +0000 |
commit | 84255c399772c6cf28bed8085ddee3816f1706de (patch) | |
tree | a1c3fe72222404be2c2588ef20a3fb9844685740 /sys | |
parent | 08e117870d2ecb029f0a677fb9bcb7c5ef1ed46b (diff) |
ptm needs no read/write, just use enodev.
ok deraadt
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/tty_pty.c | 24 | ||||
-rw-r--r-- | sys/sys/conf.h | 8 |
2 files changed, 5 insertions, 27 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index cbc7f32fed8..810ddff7070 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_pty.c,v 1.48 2010/07/02 19:57:15 tedu Exp $ */ +/* $OpenBSD: tty_pty.c,v 1.49 2010/07/21 18:48:01 nicm Exp $ */ /* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */ /* @@ -118,11 +118,7 @@ dev_t pty_getfree(void); void ptmattach(int); int ptmopen(dev_t, int, int, struct proc *); int ptmclose(dev_t, int, int, struct proc *); -int ptmread(dev_t, struct uio *, int); -int ptmwrite(dev_t, struct uio *, int); -int ptmwrite(dev_t, struct uio *, int); int ptmioctl(dev_t, u_long, caddr_t, int, struct proc *p); -int ptmpoll(dev_t, int, struct proc *p); static int ptm_vn_open(struct nameidata *); void @@ -1079,18 +1075,6 @@ ptmclose(dev_t dev, int flag, int mode, struct proc *p) } int -ptmread(dev_t dev, struct uio *uio, int ioflag) -{ - return (EIO); -} - -int -ptmwrite(dev_t dev, struct uio *uio, int ioflag) -{ - return (EIO); -} - -int ptmioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { dev_t newdev, error; @@ -1222,9 +1206,3 @@ bad: fdpunlock(fdp); return (error); } - -int -ptmpoll(dev_t dev, int events, struct proc *p) -{ - return (seltrue(dev, events, p)); -} diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 9afdfd250e9..95fae3f1355 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.103 2010/07/21 18:43:59 deraadt Exp $ */ +/* $OpenBSD: conf.h,v 1.104 2010/07/21 18:48:01 nicm Exp $ */ /* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */ /*- @@ -266,9 +266,9 @@ extern struct cdevsw cdevsw[]; /* open, close, read, write, ioctl, mmap */ #define cdev_ptm_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, \ - 0, selfalse, (dev_type_mmap((*))) 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, ioctl, poll, kqfilter XXX should be a generic device */ #define cdev_log_init(c,n) { \ |