Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pad Fix return value. fo_poll expects revents, not ...



details:   https://anonhg.NetBSD.org/src/rev/80a33813afce
branches:  trunk
changeset: 452297:80a33813afce
user:      isaki <isaki%NetBSD.org@localhost>
date:      Wed Jun 26 12:21:40 2019 +0000

description:
Fix return value.  fo_poll expects revents, not errno.

diffstat:

 sys/dev/pad/pad.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r efd16251d2ee -r 80a33813afce sys/dev/pad/pad.c
--- a/sys/dev/pad/pad.c Wed Jun 26 11:53:15 2019 +0000
+++ b/sys/dev/pad/pad.c Wed Jun 26 12:21:40 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pad.c,v 1.62 2019/06/26 11:53:15 isaki Exp $ */
+/* $NetBSD: pad.c,v 1.63 2019/06/26 12:21:40 isaki Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.62 2019/06/26 11:53:15 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.63 2019/06/26 12:21:40 isaki Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -40,6 +40,7 @@
 #include <sys/kmem.h>
 #include <sys/kernel.h>
 #include <sys/device.h>
+#include <sys/poll.h>
 #include <sys/proc.h>
 #include <sys/condvar.h>
 #include <sys/select.h>
@@ -453,7 +454,7 @@
 fops_pad_poll(struct file *fp, int events)
 {
 
-       return ENODEV;
+       return POLLERR;
 }
 
 static int



Home | Main Index | Thread Index | Old Index