kern_descrip.c (69781) | kern_descrip.c (72521) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94 | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94 |
39 * $FreeBSD: head/sys/kern/kern_descrip.c 69781 2000-12-08 21:51:06Z dwmalone $ | 39 * $FreeBSD: head/sys/kern/kern_descrip.c 72521 2001-02-15 16:34:11Z jlemon $ |
40 */ 41 42#include "opt_compat.h" 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/sysproto.h> 46#include <sys/conf.h> 47#include <sys/filedesc.h> --- 40 unchanged lines hidden (view full) --- 88 89static int do_dup __P((struct filedesc *fdp, int old, int new, register_t *retval, struct proc *p)); 90static int badfo_readwrite __P((struct file *fp, struct uio *uio, 91 struct ucred *cred, int flags, struct proc *p)); 92static int badfo_ioctl __P((struct file *fp, u_long com, caddr_t data, 93 struct proc *p)); 94static int badfo_poll __P((struct file *fp, int events, 95 struct ucred *cred, struct proc *p)); | 40 */ 41 42#include "opt_compat.h" 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/sysproto.h> 46#include <sys/conf.h> 47#include <sys/filedesc.h> --- 40 unchanged lines hidden (view full) --- 88 89static int do_dup __P((struct filedesc *fdp, int old, int new, register_t *retval, struct proc *p)); 90static int badfo_readwrite __P((struct file *fp, struct uio *uio, 91 struct ucred *cred, int flags, struct proc *p)); 92static int badfo_ioctl __P((struct file *fp, u_long com, caddr_t data, 93 struct proc *p)); 94static int badfo_poll __P((struct file *fp, int events, 95 struct ucred *cred, struct proc *p)); |
96static int badfo_kqfilter __P((struct file *fp, struct knote *kn)); |
|
96static int badfo_stat __P((struct file *fp, struct stat *sb, struct proc *p)); 97static int badfo_close __P((struct file *fp, struct proc *p)); 98 99/* 100 * Descriptor management. 101 */ 102struct filelist filehead; /* head of list of open files */ 103int nfiles; /* actual number of open files */ --- 1398 unchanged lines hidden (view full) --- 1502 } 1503} 1504 1505struct fileops badfileops = { 1506 badfo_readwrite, 1507 badfo_readwrite, 1508 badfo_ioctl, 1509 badfo_poll, | 97static int badfo_stat __P((struct file *fp, struct stat *sb, struct proc *p)); 98static int badfo_close __P((struct file *fp, struct proc *p)); 99 100/* 101 * Descriptor management. 102 */ 103struct filelist filehead; /* head of list of open files */ 104int nfiles; /* actual number of open files */ --- 1398 unchanged lines hidden (view full) --- 1503 } 1504} 1505 1506struct fileops badfileops = { 1507 badfo_readwrite, 1508 badfo_readwrite, 1509 badfo_ioctl, 1510 badfo_poll, |
1511 badfo_kqfilter, |
|
1510 badfo_stat, 1511 badfo_close 1512}; 1513 1514static int 1515badfo_readwrite(fp, uio, cred, flags, p) 1516 struct file *fp; 1517 struct uio *uio; --- 23 unchanged lines hidden (view full) --- 1541 struct ucred *cred; 1542 struct proc *p; 1543{ 1544 1545 return (0); 1546} 1547 1548static int | 1512 badfo_stat, 1513 badfo_close 1514}; 1515 1516static int 1517badfo_readwrite(fp, uio, cred, flags, p) 1518 struct file *fp; 1519 struct uio *uio; --- 23 unchanged lines hidden (view full) --- 1543 struct ucred *cred; 1544 struct proc *p; 1545{ 1546 1547 return (0); 1548} 1549 1550static int |
1551badfo_kqfilter(fp, kn) 1552 struct file *fp; 1553 struct knote *kn; 1554{ 1555 1556 return (0); 1557} 1558 1559static int |
|
1549badfo_stat(fp, sb, p) 1550 struct file *fp; 1551 struct stat *sb; 1552 struct proc *p; 1553{ 1554 1555 return (EBADF); 1556} --- 12 unchanged lines hidden --- | 1560badfo_stat(fp, sb, p) 1561 struct file *fp; 1562 struct stat *sb; 1563 struct proc *p; 1564{ 1565 1566 return (EBADF); 1567} --- 12 unchanged lines hidden --- |