patch-2.1.23 linux/fs/proc/kmsg.c

Next file: linux/fs/proc/link.c
Previous file: linux/fs/proc/fd.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.22/linux/fs/proc/kmsg.c linux/fs/proc/kmsg.c
@@ -9,6 +9,7 @@
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
+#include <linux/poll.h>
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
@@ -34,13 +35,11 @@
 	return sys_syslog(2,buf,count);
 }
 
-static int kmsg_select(struct inode *inode, struct file *file, int sel_type, select_table * wait)
+static unsigned int kmsg_poll(struct file *file, poll_table * wait)
 {
-	if (sel_type != SEL_IN)
-		return 0;
+	poll_wait(&log_wait, wait);
 	if (log_size)
-		return 1;
-	select_wait(&log_wait, wait);
+		return POLLIN | POLLRDNORM;
 	return 0;
 }
 
@@ -50,7 +49,7 @@
 	kmsg_read,
 	NULL,		/* kmsg_write */
 	NULL,		/* kmsg_readdir */
-	kmsg_select,	/* kmsg_select */
+	kmsg_poll,	/* kmsg_poll */
 	NULL,		/* kmsg_ioctl */
 	NULL,		/* mmap */
 	kmsg_open,

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov