summaryrefslogtreecommitdiff
path: root/sys/crypto
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-09-23 16:51:15 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-09-23 16:51:15 +0000
commit6bb276a1685d8546283d224a3d249c66cc329264 (patch)
tree5e1c80d6cad38a8a82f5832e1e315103e7029eb9 /sys/crypto
parent96675671ec2520ade2f83b31563ab4da72bd443d (diff)
Replace select backends with poll backends. selscan() and pollscan()
now call the poll backend. With this change we implement greater poll(2) functionality instead of emulating it via the select backend. Adapted from NetBSD and including some changes from FreeBSD. Tested by many, deraadt@ OK
Diffstat (limited to 'sys/crypto')
-rw-r--r--sys/crypto/cryptodev.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/crypto/cryptodev.c b/sys/crypto/cryptodev.c
index 001edcf5fe8..38307d4c606 100644
--- a/sys/crypto/cryptodev.c
+++ b/sys/crypto/cryptodev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cryptodev.c,v 1.59 2003/06/10 18:34:51 jason Exp $ */
+/* $OpenBSD: cryptodev.c,v 1.60 2003/09/23 16:51:12 millert Exp $ */
/*
* Copyright (c) 2001 Theo de Raadt
@@ -86,7 +86,7 @@ void cryptoattach(int);
int cryptof_read(struct file *, off_t *, struct uio *, struct ucred *);
int cryptof_write(struct file *, off_t *, struct uio *, struct ucred *);
int cryptof_ioctl(struct file *, u_long, caddr_t, struct proc *p);
-int cryptof_select(struct file *, int, struct proc *);
+int cryptof_poll(struct file *, int, struct proc *);
int cryptof_kqfilter(struct file *, struct knote *);
int cryptof_stat(struct file *, struct stat *, struct proc *);
int cryptof_close(struct file *, struct proc *);
@@ -95,7 +95,7 @@ static struct fileops cryptofops = {
cryptof_read,
cryptof_write,
cryptof_ioctl,
- cryptof_select,
+ cryptof_poll,
cryptof_kqfilter,
cryptof_stat,
cryptof_close
@@ -585,7 +585,7 @@ fail:
/* ARGSUSED */
int
-cryptof_select(struct file *fp, int which, struct proc *p)
+cryptof_poll(struct file *fp, int events, struct proc *p)
{
return (0);
}
@@ -689,9 +689,9 @@ cryptoioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
}
int
-cryptoselect(dev_t dev, int rw, struct proc *p)
+cryptopoll(dev_t dev, int events, struct proc *p)
{
- return (0);
+ return (seltrue(dev, events, p));
}
struct csession *