summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThordur I. Bjornsson <thib@cvs.openbsd.org>2008-04-12 13:32:04 +0000
committerThordur I. Bjornsson <thib@cvs.openbsd.org>2008-04-12 13:32:04 +0000
commita73334e9bdae2e7afd3a9ce357cbdd66192dbbd7 (patch)
treed034289fa9939fa33bfc592772f45af4ca9aa132
parent55b7ceed0ca2cd9984cd3d2a58ae84439a3510f0 (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@
-rw-r--r--sys/kern/spec_vnops.c36
-rw-r--r--sys/miscfs/specfs/spec_vnops.c36
-rw-r--r--sys/miscfs/specfs/specdev.h22
-rw-r--r--sys/sys/specdev.h22
4 files changed, 40 insertions, 76 deletions
diff --git a/sys/kern/spec_vnops.c b/sys/kern/spec_vnops.c
index e5d3f2c86f0..86cd86e0a27 100644
--- a/sys/kern/spec_vnops.c
+++ b/sys/kern/spec_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spec_vnops.c,v 1.45 2008/04/08 14:46:45 thib Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.46 2008/04/12 13:32:03 thib Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
@@ -59,8 +59,8 @@ int (**spec_vnodeop_p)(void *);
struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
{ &vop_default_desc, vn_default_error },
{ &vop_lookup_desc, vop_generic_lookup }, /* lookup */
- { &vop_create_desc, spec_create }, /* create */
- { &vop_mknod_desc, spec_mknod }, /* mknod */
+ { &vop_create_desc, spec_badop }, /* create */
+ { &vop_mknod_desc, spec_badop }, /* mknod */
{ &vop_open_desc, spec_open }, /* open */
{ &vop_close_desc, spec_close }, /* close */
{ &vop_access_desc, spec_access }, /* access */
@@ -71,28 +71,28 @@ struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
{ &vop_ioctl_desc, spec_ioctl }, /* ioctl */
{ &vop_poll_desc, spec_poll }, /* poll */
{ &vop_kqfilter_desc, spec_kqfilter }, /* kqfilter */
- { &vop_revoke_desc, spec_revoke }, /* revoke */
+ { &vop_revoke_desc, vop_generic_revoke }, /* revoke */
{ &vop_fsync_desc, spec_fsync }, /* fsync */
- { &vop_remove_desc, spec_remove }, /* remove */
- { &vop_link_desc, spec_link }, /* link */
- { &vop_rename_desc, spec_rename }, /* rename */
- { &vop_mkdir_desc, spec_mkdir }, /* mkdir */
- { &vop_rmdir_desc, spec_rmdir }, /* rmdir */
- { &vop_symlink_desc, spec_symlink }, /* symlink */
- { &vop_readdir_desc, spec_readdir }, /* readdir */
- { &vop_readlink_desc, spec_readlink }, /* readlink */
- { &vop_abortop_desc, spec_abortop }, /* abortop */
+ { &vop_remove_desc, spec_badop }, /* remove */
+ { &vop_link_desc, spec_badop }, /* link */
+ { &vop_rename_desc, spec_badop }, /* rename */
+ { &vop_mkdir_desc, spec_badop }, /* mkdir */
+ { &vop_rmdir_desc, spec_badop }, /* rmdir */
+ { &vop_symlink_desc, spec_badop }, /* symlink */
+ { &vop_readdir_desc, spec_badop }, /* readdir */
+ { &vop_readlink_desc, spec_badop }, /* readlink */
+ { &vop_abortop_desc, spec_badop }, /* abortop */
{ &vop_inactive_desc, spec_inactive }, /* inactive */
- { &vop_reclaim_desc, spec_reclaim }, /* reclaim */
- { &vop_lock_desc, spec_lock }, /* lock */
- { &vop_unlock_desc, spec_unlock }, /* unlock */
+ { &vop_reclaim_desc, nullop }, /* reclaim */
+ { &vop_lock_desc, vop_generic_lock }, /* lock */
+ { &vop_unlock_desc, vop_generic_unlock }, /* unlock */
{ &vop_bmap_desc, spec_bmap }, /* bmap */
{ &vop_strategy_desc, spec_strategy }, /* strategy */
{ &vop_print_desc, spec_print }, /* print */
- { &vop_islocked_desc, spec_islocked }, /* islocked */
+ { &vop_islocked_desc, vop_generic_islocked }, /* islocked */
{ &vop_pathconf_desc, spec_pathconf }, /* pathconf */
{ &vop_advlock_desc, spec_advlock }, /* advlock */
- { &vop_bwrite_desc, spec_bwrite }, /* bwrite */
+ { &vop_bwrite_desc, vop_generic_bwrite }, /* bwrite */
{ NULL, NULL }
};
struct vnodeopv_desc spec_vnodeop_opv_desc =
diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c
index e5d3f2c86f0..86cd86e0a27 100644
--- a/sys/miscfs/specfs/spec_vnops.c
+++ b/sys/miscfs/specfs/spec_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spec_vnops.c,v 1.45 2008/04/08 14:46:45 thib Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.46 2008/04/12 13:32:03 thib Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
@@ -59,8 +59,8 @@ int (**spec_vnodeop_p)(void *);
struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
{ &vop_default_desc, vn_default_error },
{ &vop_lookup_desc, vop_generic_lookup }, /* lookup */
- { &vop_create_desc, spec_create }, /* create */
- { &vop_mknod_desc, spec_mknod }, /* mknod */
+ { &vop_create_desc, spec_badop }, /* create */
+ { &vop_mknod_desc, spec_badop }, /* mknod */
{ &vop_open_desc, spec_open }, /* open */
{ &vop_close_desc, spec_close }, /* close */
{ &vop_access_desc, spec_access }, /* access */
@@ -71,28 +71,28 @@ struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
{ &vop_ioctl_desc, spec_ioctl }, /* ioctl */
{ &vop_poll_desc, spec_poll }, /* poll */
{ &vop_kqfilter_desc, spec_kqfilter }, /* kqfilter */
- { &vop_revoke_desc, spec_revoke }, /* revoke */
+ { &vop_revoke_desc, vop_generic_revoke }, /* revoke */
{ &vop_fsync_desc, spec_fsync }, /* fsync */
- { &vop_remove_desc, spec_remove }, /* remove */
- { &vop_link_desc, spec_link }, /* link */
- { &vop_rename_desc, spec_rename }, /* rename */
- { &vop_mkdir_desc, spec_mkdir }, /* mkdir */
- { &vop_rmdir_desc, spec_rmdir }, /* rmdir */
- { &vop_symlink_desc, spec_symlink }, /* symlink */
- { &vop_readdir_desc, spec_readdir }, /* readdir */
- { &vop_readlink_desc, spec_readlink }, /* readlink */
- { &vop_abortop_desc, spec_abortop }, /* abortop */
+ { &vop_remove_desc, spec_badop }, /* remove */
+ { &vop_link_desc, spec_badop }, /* link */
+ { &vop_rename_desc, spec_badop }, /* rename */
+ { &vop_mkdir_desc, spec_badop }, /* mkdir */
+ { &vop_rmdir_desc, spec_badop }, /* rmdir */
+ { &vop_symlink_desc, spec_badop }, /* symlink */
+ { &vop_readdir_desc, spec_badop }, /* readdir */
+ { &vop_readlink_desc, spec_badop }, /* readlink */
+ { &vop_abortop_desc, spec_badop }, /* abortop */
{ &vop_inactive_desc, spec_inactive }, /* inactive */
- { &vop_reclaim_desc, spec_reclaim }, /* reclaim */
- { &vop_lock_desc, spec_lock }, /* lock */
- { &vop_unlock_desc, spec_unlock }, /* unlock */
+ { &vop_reclaim_desc, nullop }, /* reclaim */
+ { &vop_lock_desc, vop_generic_lock }, /* lock */
+ { &vop_unlock_desc, vop_generic_unlock }, /* unlock */
{ &vop_bmap_desc, spec_bmap }, /* bmap */
{ &vop_strategy_desc, spec_strategy }, /* strategy */
{ &vop_print_desc, spec_print }, /* print */
- { &vop_islocked_desc, spec_islocked }, /* islocked */
+ { &vop_islocked_desc, vop_generic_islocked }, /* islocked */
{ &vop_pathconf_desc, spec_pathconf }, /* pathconf */
{ &vop_advlock_desc, spec_advlock }, /* advlock */
- { &vop_bwrite_desc, spec_bwrite }, /* bwrite */
+ { &vop_bwrite_desc, vop_generic_bwrite }, /* bwrite */
{ NULL, NULL }
};
struct vnodeopv_desc spec_vnodeop_opv_desc =
diff --git a/sys/miscfs/specfs/specdev.h b/sys/miscfs/specfs/specdev.h
index 98eb73cfe8d..cba4680641a 100644
--- a/sys/miscfs/specfs/specdev.h
+++ b/sys/miscfs/specfs/specdev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: specdev.h,v 1.22 2008/04/08 14:46:45 thib Exp $ */
+/* $OpenBSD: specdev.h,v 1.23 2008/04/12 13:32:03 thib Exp $ */
/* $NetBSD: specdev.h,v 1.12 1996/02/13 13:13:01 mycroft Exp $ */
/*
@@ -94,8 +94,6 @@ int spec_ebadf(void *);
int spec_getattr(void *);
int spec_setattr(void *);
int spec_access(void *);
-#define spec_create spec_badop
-#define spec_mknod spec_badop
int spec_open(void *);
int spec_close(void *);
int spec_read(void *);
@@ -104,28 +102,12 @@ int spec_ioctl(void *);
int spec_poll(void *);
int spec_kqfilter(void *);
int spec_fsync(void *);
-#define spec_remove spec_badop
-#define spec_link spec_badop
-#define spec_rename spec_badop
-#define spec_mkdir spec_badop
-#define spec_rmdir spec_badop
-#define spec_symlink spec_badop
-#define spec_readdir spec_badop
-#define spec_readlink spec_badop
-#define spec_abortop spec_badop
-int spec_inactive(void *);
-#define spec_reclaim nullop
-#define spec_lock vop_generic_lock
-#define spec_unlock vop_generic_unlock
-#define spec_islocked vop_generic_islocked
+int spec_inactive(void *);
int spec_bmap(void *);
int spec_strategy(void *);
int spec_print(void *);
int spec_pathconf(void *);
int spec_advlock(void *);
-#define spec_reallocblks spec_badop
-#define spec_bwrite vop_generic_bwrite
-#define spec_revoke vop_generic_revoke
int spec_vnoperate(void *);
diff --git a/sys/sys/specdev.h b/sys/sys/specdev.h
index 98eb73cfe8d..cba4680641a 100644
--- a/sys/sys/specdev.h
+++ b/sys/sys/specdev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: specdev.h,v 1.22 2008/04/08 14:46:45 thib Exp $ */
+/* $OpenBSD: specdev.h,v 1.23 2008/04/12 13:32:03 thib Exp $ */
/* $NetBSD: specdev.h,v 1.12 1996/02/13 13:13:01 mycroft Exp $ */
/*
@@ -94,8 +94,6 @@ int spec_ebadf(void *);
int spec_getattr(void *);
int spec_setattr(void *);
int spec_access(void *);
-#define spec_create spec_badop
-#define spec_mknod spec_badop
int spec_open(void *);
int spec_close(void *);
int spec_read(void *);
@@ -104,28 +102,12 @@ int spec_ioctl(void *);
int spec_poll(void *);
int spec_kqfilter(void *);
int spec_fsync(void *);
-#define spec_remove spec_badop
-#define spec_link spec_badop
-#define spec_rename spec_badop
-#define spec_mkdir spec_badop
-#define spec_rmdir spec_badop
-#define spec_symlink spec_badop
-#define spec_readdir spec_badop
-#define spec_readlink spec_badop
-#define spec_abortop spec_badop
-int spec_inactive(void *);
-#define spec_reclaim nullop
-#define spec_lock vop_generic_lock
-#define spec_unlock vop_generic_unlock
-#define spec_islocked vop_generic_islocked
+int spec_inactive(void *);
int spec_bmap(void *);
int spec_strategy(void *);
int spec_print(void *);
int spec_pathconf(void *);
int spec_advlock(void *);
-#define spec_reallocblks spec_badop
-#define spec_bwrite vop_generic_bwrite
-#define spec_revoke vop_generic_revoke
int spec_vnoperate(void *);