kernel: add handling for ENODEV in poll_copyout and select_copyout
authorMarkus Pfeiffer <markus.pfeiffer@morphism.de>
Wed, 4 Jul 2012 13:12:46 +0000 (13:12 +0000)
committerMarkus Pfeiffer <markus.pfeiffer@morphism.de>
Wed, 4 Jul 2012 13:13:33 +0000 (13:13 +0000)
sys/kern/sys_generic.c

index 8bc9dc1..7922914 100644 (file)
@@ -1024,6 +1024,7 @@ select_copyout(void *arg, struct kevent *kevp, int count, int *res)
 
                        switch (error) {
                        case EBADF:
+                       case ENODEV:
                                /*
                                 * A bad file descriptor is considered a
                                 * fatal error for select, bail out.
@@ -1344,6 +1345,7 @@ poll_copyout(void *arg, struct kevent *kevp, int count, int *res)
                        if (kevp[i].flags & EV_ERROR) {
                                switch(kevp[i].data) {
                                case EBADF:
+                               case POLLNVAL:
                                        /* Bad file descriptor */
                                        if (count_res)
                                                ++*res;