diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-04-24 17:39:46 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-04-24 17:39:46 +0000 |
commit | c0c73b6183704fb919a8f6da029c467717e84c31 (patch) | |
tree | 081a964f15e23186a5c93ae40aabdd166c8e6157 /sys/miscfs/procfs/procfs_vnops.c | |
parent | a04ad4e37b5d32f5ef17070004eb2a05cf460149 (diff) |
remove useless defines for the vnode operations, and instead
init the op array functions with whatever the define was set
too.
ok dlg@,blambert@
Diffstat (limited to 'sys/miscfs/procfs/procfs_vnops.c')
-rw-r--r-- | sys/miscfs/procfs/procfs_vnops.c | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c index 8d5226ff42c..ad7cd98aed0 100644 --- a/sys/miscfs/procfs/procfs_vnops.c +++ b/sys/miscfs/procfs/procfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs_vnops.c,v 1.41 2007/09/01 15:14:44 martin Exp $ */ +/* $OpenBSD: procfs_vnops.c,v 1.42 2008/04/24 17:39:45 thib Exp $ */ /* $NetBSD: procfs_vnops.c,v 1.40 1996/03/16 23:52:55 christos Exp $ */ /* @@ -118,35 +118,21 @@ static pid_t atopid(const char *, u_int); int procfs_badop(void *); int procfs_lookup(void *); -#define procfs_create procfs_badop -#define procfs_mknod procfs_badop int procfs_open(void *); int procfs_close(void *); int procfs_access(void *); int procfs_getattr(void *); int procfs_setattr(void *); -#define procfs_read procfs_rw -#define procfs_write procfs_rw int procfs_ioctl(void *); -#define procfs_fsync procfs_badop -#define procfs_remove procfs_badop int procfs_link(void *); -#define procfs_rename procfs_badop -#define procfs_mkdir procfs_badop -#define procfs_rmdir procfs_badop int procfs_symlink(void *); int procfs_readdir(void *); int procfs_readlink(void *); int procfs_inactive(void *); int procfs_reclaim(void *); -#define procfs_lock nullop -#define procfs_unlock nullop int procfs_bmap(void *); -#define procfs_strategy procfs_badop int procfs_print(void *); int procfs_pathconf(void *); -#define procfs_islocked nullop -#define procfs_advlock procfs_badop static pid_t atopid(const char *, u_int); @@ -157,37 +143,37 @@ int (**procfs_vnodeop_p)(void *); struct vnodeopv_entry_desc procfs_vnodeop_entries[] = { { &vop_default_desc, vn_default_error }, { &vop_lookup_desc, procfs_lookup }, /* lookup */ - { &vop_create_desc, procfs_create }, /* create */ - { &vop_mknod_desc, procfs_mknod }, /* mknod */ + { &vop_create_desc, procfs_badop }, /* create */ + { &vop_mknod_desc, procfs_badop }, /* mknod */ { &vop_open_desc, procfs_open }, /* open */ { &vop_close_desc, procfs_close }, /* close */ { &vop_access_desc, procfs_access }, /* access */ { &vop_getattr_desc, procfs_getattr }, /* getattr */ { &vop_setattr_desc, procfs_setattr }, /* setattr */ - { &vop_read_desc, procfs_read }, /* read */ - { &vop_write_desc, procfs_write }, /* write */ + { &vop_read_desc, procfs_rw }, /* read */ + { &vop_write_desc, procfs_rw }, /* write */ { &vop_ioctl_desc, procfs_ioctl }, /* ioctl */ { &vop_poll_desc, procfs_poll }, /* poll */ - { &vop_fsync_desc, procfs_fsync }, /* fsync */ - { &vop_remove_desc, procfs_remove }, /* remove */ + { &vop_fsync_desc, procfs_badop}, /* fsync */ + { &vop_remove_desc, procfs_badop }, /* remove */ { &vop_link_desc, procfs_link }, /* link */ - { &vop_rename_desc, procfs_rename }, /* rename */ - { &vop_mkdir_desc, procfs_mkdir }, /* mkdir */ - { &vop_rmdir_desc, procfs_rmdir }, /* rmdir */ + { &vop_rename_desc, procfs_badop }, /* rename */ + { &vop_mkdir_desc, procfs_badop }, /* mkdir */ + { &vop_rmdir_desc, procfs_badop }, /* rmdir */ { &vop_symlink_desc, procfs_symlink }, /* symlink */ { &vop_readdir_desc, procfs_readdir }, /* readdir */ { &vop_readlink_desc, procfs_readlink }, /* readlink */ { &vop_abortop_desc, vop_generic_abortop }, /* abortop */ { &vop_inactive_desc, procfs_inactive }, /* inactive */ { &vop_reclaim_desc, procfs_reclaim }, /* reclaim */ - { &vop_lock_desc, procfs_lock }, /* lock */ - { &vop_unlock_desc, procfs_unlock }, /* unlock */ + { &vop_lock_desc, nullop }, /* lock */ + { &vop_unlock_desc, nullop }, /* unlock */ { &vop_bmap_desc, procfs_bmap }, /* bmap */ - { &vop_strategy_desc, procfs_strategy }, /* strategy */ + { &vop_strategy_desc, procfs_badop }, /* strategy */ { &vop_print_desc, procfs_print }, /* print */ - { &vop_islocked_desc, procfs_islocked }, /* islocked */ + { &vop_islocked_desc, nullop }, /* islocked */ { &vop_pathconf_desc, procfs_pathconf }, /* pathconf */ - { &vop_advlock_desc, procfs_advlock }, /* advlock */ + { &vop_advlock_desc, procfs_badop }, /* advlock */ { NULL, NULL } }; struct vnodeopv_desc procfs_vnodeop_opv_desc = |