* Copyright (c) 1989 The Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
* @(#)dead_vnops.c 7.3 (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 */
* Trivial lookup routine that always fails.
* Open always fails as if device did not exist.
dead_open(vp
, mode
, cred
)
dead_read(vp
, uio
, offp
, ioflag
, cred
)
* We have to wait during times when the vnode is
while (vp
->v_flag
& VXLOCK
) {
sleep((caddr_t
)vp
, PINOD
);
return (VOP_READ(vp
, uio
, offp
, ioflag
, cred
));
dead_write(vp
, uio
, offp
, ioflag
, cred
)
register struct vnode
*vp
;
* We have to wait during times when the vnode is
while (vp
->v_flag
& VXLOCK
) {
sleep((caddr_t
)vp
, PINOD
);
return (VOP_WRITE(vp
, uio
, offp
, ioflag
, cred
));
* Device ioctl operation.
dead_ioctl(vp
, com
, data
, fflag
, cred
)
* We have to wait during times when the vnode is
while (vp
->v_flag
& VXLOCK
) {
sleep((caddr_t
)vp
, PINOD
);
return (VOP_IOCTL(vp
, com
, data
, fflag
, cred
));
dead_select(vp
, which
, cred
)
* Let the user find out that the descriptor is gone.
* Just call the device strategy routine
* We have to wait during times when the vnode is
while (bp
->b_vp
->v_flag
& VXLOCK
) {
bp
->b_vp
->v_flag
|= VXWANT
;
sleep((caddr_t
)bp
->b_vp
, PINOD
);
return (VOP_STRATEGY(bp
));
* Wait until the vnode has finished changing state.
* We have to wait during times when the vnode is
while (vp
->v_flag
& VXLOCK
) {
sleep((caddr_t
)vp
, PINOD
);
* Wait until the vnode has finished changing state.
dead_bmap(vp
, bn
, vpp
, bnp
)
* We have to wait during times when the vnode is
while (vp
->v_flag
& VXLOCK
) {
sleep((caddr_t
)vp
, PINOD
);
return (VOP_BMAP(vp
, bn
, vpp
, bnp
));
* Empty vnode failed operation
* Empty vnode bad operation
panic("dead_badop called");
* Empty vnode null operation