mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 14:48:57 +00:00
Use vop_panic() instead of rolling our own.
This commit is contained in:
parent
915a1dab22
commit
ef41ad17bd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=95944
@ -46,7 +46,6 @@ static int chkvnlock(struct vnode *);
|
||||
/*
|
||||
* Prototypes for dead operations on vnodes.
|
||||
*/
|
||||
static int dead_badop(void);
|
||||
static int dead_bmap(struct vop_bmap_args *);
|
||||
static int dead_ioctl(struct vop_ioctl_args *);
|
||||
static int dead_lock(struct vop_lock_args *);
|
||||
@ -63,15 +62,15 @@ static struct vnodeopv_entry_desc dead_vnodeop_entries[] = {
|
||||
{ &vop_access_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_advlock_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_bmap_desc, (vop_t *) dead_bmap },
|
||||
{ &vop_create_desc, (vop_t *) dead_badop },
|
||||
{ &vop_create_desc, (vop_t *) vop_panic },
|
||||
{ &vop_getattr_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_inactive_desc, (vop_t *) vop_null },
|
||||
{ &vop_ioctl_desc, (vop_t *) dead_ioctl },
|
||||
{ &vop_link_desc, (vop_t *) dead_badop },
|
||||
{ &vop_link_desc, (vop_t *) vop_panic },
|
||||
{ &vop_lock_desc, (vop_t *) dead_lock },
|
||||
{ &vop_lookup_desc, (vop_t *) dead_lookup },
|
||||
{ &vop_mkdir_desc, (vop_t *) dead_badop },
|
||||
{ &vop_mknod_desc, (vop_t *) dead_badop },
|
||||
{ &vop_mkdir_desc, (vop_t *) vop_panic },
|
||||
{ &vop_mknod_desc, (vop_t *) vop_panic },
|
||||
{ &vop_open_desc, (vop_t *) dead_open },
|
||||
{ &vop_pathconf_desc, (vop_t *) vop_ebadf }, /* per pathconf(2) */
|
||||
{ &vop_poll_desc, (vop_t *) dead_poll },
|
||||
@ -80,11 +79,11 @@ static struct vnodeopv_entry_desc dead_vnodeop_entries[] = {
|
||||
{ &vop_readdir_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_readlink_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_reclaim_desc, (vop_t *) vop_null },
|
||||
{ &vop_remove_desc, (vop_t *) dead_badop },
|
||||
{ &vop_rename_desc, (vop_t *) dead_badop },
|
||||
{ &vop_rmdir_desc, (vop_t *) dead_badop },
|
||||
{ &vop_remove_desc, (vop_t *) vop_panic },
|
||||
{ &vop_rename_desc, (vop_t *) vop_panic },
|
||||
{ &vop_rmdir_desc, (vop_t *) vop_panic },
|
||||
{ &vop_setattr_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_symlink_desc, (vop_t *) dead_badop },
|
||||
{ &vop_symlink_desc, (vop_t *) vop_panic },
|
||||
{ &vop_write_desc, (vop_t *) dead_write },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
@ -253,17 +252,6 @@ dead_print(ap)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Empty vnode bad operation
|
||||
*/
|
||||
static int
|
||||
dead_badop()
|
||||
{
|
||||
|
||||
panic("dead_badop called");
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
/*
|
||||
* We have to wait during times when the vnode is
|
||||
* in a state of change.
|
||||
|
@ -66,7 +66,6 @@ struct fifoinfo {
|
||||
long fi_writers;
|
||||
};
|
||||
|
||||
static int fifo_badop(void);
|
||||
static int fifo_print(struct vop_print_args *);
|
||||
static int fifo_lookup(struct vop_lookup_args *);
|
||||
static int fifo_open(struct vop_open_args *);
|
||||
@ -95,30 +94,30 @@ static struct vnodeopv_entry_desc fifo_vnodeop_entries[] = {
|
||||
{ &vop_access_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_advlock_desc, (vop_t *) fifo_advlock },
|
||||
{ &vop_close_desc, (vop_t *) fifo_close },
|
||||
{ &vop_create_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_create_desc, (vop_t *) vop_panic },
|
||||
{ &vop_getattr_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_getwritemount_desc, (vop_t *) vop_stdgetwritemount },
|
||||
{ &vop_ioctl_desc, (vop_t *) fifo_ioctl },
|
||||
{ &vop_kqfilter_desc, (vop_t *) fifo_kqfilter },
|
||||
{ &vop_lease_desc, (vop_t *) vop_null },
|
||||
{ &vop_link_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_link_desc, (vop_t *) vop_panic },
|
||||
{ &vop_lookup_desc, (vop_t *) fifo_lookup },
|
||||
{ &vop_mkdir_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_mknod_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_mkdir_desc, (vop_t *) vop_panic },
|
||||
{ &vop_mknod_desc, (vop_t *) vop_panic },
|
||||
{ &vop_open_desc, (vop_t *) fifo_open },
|
||||
{ &vop_pathconf_desc, (vop_t *) fifo_pathconf },
|
||||
{ &vop_poll_desc, (vop_t *) fifo_poll },
|
||||
{ &vop_print_desc, (vop_t *) fifo_print },
|
||||
{ &vop_read_desc, (vop_t *) fifo_read },
|
||||
{ &vop_readdir_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_readlink_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_reallocblks_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_readdir_desc, (vop_t *) vop_panic },
|
||||
{ &vop_readlink_desc, (vop_t *) vop_panic },
|
||||
{ &vop_reallocblks_desc, (vop_t *) vop_panic },
|
||||
{ &vop_reclaim_desc, (vop_t *) vop_null },
|
||||
{ &vop_remove_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_rename_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_rmdir_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_remove_desc, (vop_t *) vop_panic },
|
||||
{ &vop_rename_desc, (vop_t *) vop_panic },
|
||||
{ &vop_rmdir_desc, (vop_t *) vop_panic },
|
||||
{ &vop_setattr_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_symlink_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_symlink_desc, (vop_t *) vop_panic },
|
||||
{ &vop_write_desc, (vop_t *) fifo_write },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
@ -610,14 +609,3 @@ fifo_advlock(ap)
|
||||
|
||||
return (ap->a_flags & F_FLOCK ? EOPNOTSUPP : EINVAL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fifo bad operation
|
||||
*/
|
||||
static int
|
||||
fifo_badop()
|
||||
{
|
||||
|
||||
panic("fifo_badop called");
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user