From 4d233d10d0545c59742d0bbc2437e6f169ee7086 Mon Sep 17 00:00:00 2001 From: Venkatesh Srinivas Date: Fri, 17 Dec 2010 17:08:22 -0800 Subject: [PATCH] kernel -- Remove fo_poll. --- sys/kern/kern_descrip.c | 7 ------- sys/sys/file.h | 3 --- sys/sys/file2.h | 14 -------------- 3 files changed, 24 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index d160e550d5..ef81c41455 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2782,7 +2782,6 @@ struct fileops badfileops = { .fo_read = badfo_readwrite, .fo_write = badfo_readwrite, .fo_ioctl = badfo_ioctl, - .fo_poll = badfo_poll, .fo_kqfilter = badfo_kqfilter, .fo_stat = badfo_stat, .fo_close = badfo_close, @@ -2806,12 +2805,6 @@ badfo_ioctl(struct file *fp, u_long com, caddr_t data, return (EBADF); } -int -badfo_poll(struct file *fp, int events, struct ucred *cred) -{ - return (0); -} - /* * Must return an error to prevent registration, typically * due to a revoked descriptor (file_filtops assigned). diff --git a/sys/sys/file.h b/sys/sys/file.h index cd3c8f6221..e2bbcf0d15 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -85,8 +85,6 @@ struct fileops { struct ucred *cred, int flags); int (*fo_ioctl) (struct file *fp, u_long com, caddr_t data, struct ucred *cred, struct sysmsg *msg); - int (*fo_poll) (struct file *fp, int events, - struct ucred *cred); int (*fo_kqfilter)(struct file *fp, struct knote *kn); int (*fo_stat) (struct file *fp, struct stat *sb, struct ucred *cred); @@ -176,7 +174,6 @@ int badfo_readwrite(struct file *fp, struct uio *uio, struct ucred *cred, int flags); int badfo_ioctl(struct file *fp, u_long com, caddr_t data, struct ucred *cred, struct sysmsg *msg); -int badfo_poll (struct file *fp, int events, struct ucred *cred); int badfo_kqfilter(struct file *fp, struct knote *kn); int badfo_stat(struct file *fp, struct stat *sb, struct ucred *cred); int badfo_close(struct file *fp); diff --git a/sys/sys/file2.h b/sys/sys/file2.h index 02625b37b5..837cdc6636 100644 --- a/sys/sys/file2.h +++ b/sys/sys/file2.h @@ -90,20 +90,6 @@ fo_ioctl( return (error); } -static __inline int -fo_poll( - struct file *fp, - int events, - struct ucred *cred -) { - int error; - - fhold(fp); - error = (*fp->f_ops->fo_poll)(fp, events, cred); - fdrop(fp); - return (error); -} - static __inline int fo_stat(struct file *fp, struct stat *sb, struct ucred *cred) { -- 2.41.0