* Copyright (c) 1989 The Regents of the University of California.
* %sccs.include.redist.c%
* @(#)dead_vnops.c 7.12 (Berkeley) %G%
struct vnodeops dead_vnodeops
= {
dead_lookup
, /* lookup */
dead_ebadf
, /* getattr */
dead_ebadf
, /* setattr */
dead_select
, /* select */
dead_badop
, /* symlink */
dead_ebadf
, /* readdir */
dead_ebadf
, /* readlink */
dead_badop
, /* abortop */
dead_nullop
, /* inactive */
dead_nullop
, /* reclaim */
dead_nullop
, /* unlock */
dead_strategy
, /* strategy */
dead_nullop
, /* islocked */
dead_ebadf
, /* advlock */
* Trivial lookup routine that always fails.
* Open always fails as if device did not exist.
dead_open(vp
, mode
, cred
)
dead_read(vp
, uio
, ioflag
, cred
)
panic("dead_read: lock");
* Return EOF for character devices, EIO for others
dead_write(vp
, uio
, ioflag
, cred
)
register struct vnode
*vp
;
panic("dead_write: lock");
* Device ioctl operation.
dead_ioctl(vp
, com
, data
, fflag
, cred
)
return (VOP_IOCTL(vp
, com
, data
, fflag
, cred
));
dead_select(vp
, which
, fflags
, cred
)
* Let the user find out that the descriptor is gone.
* Just call the device strategy routine
if (bp
->b_vp
== NULL
|| !chkvnlock(bp
->b_vp
)) {
return (VOP_STRATEGY(bp
));
* Wait until the vnode has finished changing state.
* Wait until the vnode has finished changing state.
dead_bmap(vp
, bn
, vpp
, bnp
)
return (VOP_BMAP(vp
, bn
, vpp
, bnp
));
* Print out the contents of a dead vnode.
printf("tag VT_NON, dead vnode\n");
* Empty vnode failed operation
* Empty vnode bad operation
panic("dead_badop called");
* Empty vnode null operation
* We have to wait during times when the vnode is
register struct vnode
*vp
;
while (vp
->v_flag
& VXLOCK
) {
sleep((caddr_t
)vp
, PINOD
);