Deleted Added
full compact
39c39
< * $Id: kern_descrip.c,v 1.63 1999/05/31 11:27:30 phk Exp $
---
> * $Id: kern_descrip.c,v 1.64 1999/06/07 20:37:27 msmith Exp $
103a104,110
> static int badfo_readwrite __P((struct file *fp, struct uio *uio,
> struct ucred *cred, int flags));
> static int badfo_ioctl __P((struct file *fp, u_long com, caddr_t data,
> struct proc *p));
> static int badfo_poll __P((struct file *fp, int events,
> struct ucred *cred, struct proc *p));
> static int badfo_close __P((struct file *fp, struct proc *p));
838a846,850
> fp->f_count = 1;
> fp->f_cred = p->p_ucred;
> fp->f_ops = &badfileops;
> fp->f_seqcount = 1;
> crhold(fp->f_cred);
845,848d856
< fp->f_count = 1;
< fp->f_cred = p->p_ucred;
< fp->f_seqcount = 1;
< crhold(fp->f_cred);
1081c1089
< if (fp->f_ops)
---
> if (fp->f_ops != &badfileops)
1325a1334,1383
> struct fileops badfileops = {
> badfo_readwrite,
> badfo_readwrite,
> badfo_ioctl,
> badfo_poll,
> badfo_close
> };
>
> static int
> badfo_readwrite(fp, uio, cred, flags)
> struct file *fp;
> struct uio *uio;
> struct ucred *cred;
> int flags;
> {
>
> return (EBADF);
> }
>
> static int
> badfo_ioctl(fp, com, data, p)
> struct file *fp;
> u_long com;
> caddr_t data;
> struct proc *p;
> {
>
> return (EBADF);
> }
>
> static int
> badfo_poll(fp, events, cred, p)
> struct file *fp;
> int events;
> struct ucred *cred;
> struct proc *p;
> {
>
> return (0);
> }
>
> static int
> badfo_close(fp, p)
> struct file *fp;
> struct proc *p;
> {
>
> return (EBADF);
> }
>