summaryrefslogtreecommitdiff
path: root/sys/miscfs
diff options
context:
space:
mode:
authorThordur I. Bjornsson <thib@cvs.openbsd.org>2008-05-03 14:41:30 +0000
committerThordur I. Bjornsson <thib@cvs.openbsd.org>2008-05-03 14:41:30 +0000
commita96362c37a21db8978123564dea721cdbd4421c6 (patch)
treed808160eb7984a8bcc5e550af5fa821852c0c464 /sys/miscfs
parent351632319bc7ed4e24d0f3049fd70e90063b4909 (diff)
Introduce vop_generic_bmap(); use it where applicable.
one thing of note, fifofs changes in that its bmap now sets the runp too 0, but that was an oversight in the old code. ok art@
Diffstat (limited to 'sys/miscfs')
-rw-r--r--sys/miscfs/fifofs/fifo.h3
-rw-r--r--sys/miscfs/fifofs/fifo_vnops.c18
-rw-r--r--sys/miscfs/specfs/spec_vnops.c22
-rw-r--r--sys/miscfs/specfs/specdev.h3
4 files changed, 6 insertions, 40 deletions
diff --git a/sys/miscfs/fifofs/fifo.h b/sys/miscfs/fifofs/fifo.h
index b5056876774..77a8a4c52c9 100644
--- a/sys/miscfs/fifofs/fifo.h
+++ b/sys/miscfs/fifofs/fifo.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fifo.h,v 1.18 2008/04/24 17:39:45 thib Exp $ */
+/* $OpenBSD: fifo.h,v 1.19 2008/05/03 14:41:29 thib Exp $ */
/* $NetBSD: fifo.h,v 1.10 1996/02/09 22:40:15 christos Exp $ */
/*
@@ -48,7 +48,6 @@ int fifo_poll(void *);
int fifo_kqfilter(void *);
int fifo_inactive(void *);
int fifo_reclaim(void *);
-int fifo_bmap(void *);
int fifo_print(void *);
int fifo_pathconf(void *);
int fifo_advlock(void *);
diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c
index e301bd3fc20..7b959641c71 100644
--- a/sys/miscfs/fifofs/fifo_vnops.c
+++ b/sys/miscfs/fifofs/fifo_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fifo_vnops.c,v 1.27 2008/04/24 17:39:45 thib Exp $ */
+/* $OpenBSD: fifo_vnops.c,v 1.28 2008/05/03 14:41:29 thib Exp $ */
/* $NetBSD: fifo_vnops.c,v 1.18 1996/03/16 23:52:42 christos Exp $ */
/*
@@ -92,7 +92,7 @@ struct vnodeopv_entry_desc fifo_vnodeop_entries[] = {
{ &vop_reclaim_desc, fifo_reclaim }, /* reclaim */
{ &vop_lock_desc, vop_generic_lock }, /* lock */
{ &vop_unlock_desc, vop_generic_unlock }, /* unlock */
- { &vop_bmap_desc, fifo_bmap }, /* bmap */
+ { &vop_bmap_desc, vop_generic_bmap }, /* bmap */
{ &vop_strategy_desc, fifo_badop }, /* strategy */
{ &vop_print_desc, fifo_print }, /* print */
{ &vop_islocked_desc, vop_generic_islocked }, /* islocked */
@@ -338,20 +338,6 @@ fifo_inactive(void *v)
return (0);
}
-/*
- * This is a noop, simply returning what one has been given.
- */
-int
-fifo_bmap(void *v)
-{
- struct vop_bmap_args *ap = v;
-
- if (ap->a_vpp != NULL)
- *ap->a_vpp = ap->a_vp;
- if (ap->a_bnp != NULL)
- *ap->a_bnp = ap->a_bn;
- return (0);
-}
/*
* Device close routine
diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c
index d832813d253..65fc34603e4 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.47 2008/04/14 10:15:50 thib Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.48 2008/05/03 14:41:29 thib Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
@@ -86,7 +86,7 @@ struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
{ &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_bmap_desc, vop_generic_bmap }, /* bmap */
{ &vop_strategy_desc, spec_strategy }, /* strategy */
{ &vop_print_desc, spec_print }, /* print */
{ &vop_islocked_desc, vop_generic_islocked }, /* islocked */
@@ -482,24 +482,6 @@ spec_strategy(void *v)
}
/*
- * This is a noop, simply returning what one has been given.
- */
-int
-spec_bmap(void *v)
-{
- struct vop_bmap_args *ap = v;
-
- if (ap->a_vpp != NULL)
- *ap->a_vpp = ap->a_vp;
- if (ap->a_bnp != NULL)
- *ap->a_bnp = ap->a_bn;
- if (ap->a_runp != NULL)
- *ap->a_runp = 0;
-
- return (0);
-}
-
-/*
* Device close routine
*/
/* ARGSUSED */
diff --git a/sys/miscfs/specfs/specdev.h b/sys/miscfs/specfs/specdev.h
index 98ab6ab3310..55d9322b493 100644
--- a/sys/miscfs/specfs/specdev.h
+++ b/sys/miscfs/specfs/specdev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: specdev.h,v 1.24 2008/04/14 10:15:50 thib Exp $ */
+/* $OpenBSD: specdev.h,v 1.25 2008/05/03 14:41:29 thib Exp $ */
/* $NetBSD: specdev.h,v 1.12 1996/02/13 13:13:01 mycroft Exp $ */
/*
@@ -102,7 +102,6 @@ int spec_poll(void *);
int spec_kqfilter(void *);
int spec_fsync(void *);
int spec_inactive(void *);
-int spec_bmap(void *);
int spec_strategy(void *);
int spec_print(void *);
int spec_pathconf(void *);