summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2006-11-27 17:00:10 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2006-11-27 17:00:10 +0000
commitb175d36abd9177fbc4ee46cd73e14867c89f543b (patch)
treedf005c259b71b9899ace6c51c16df05f6532e2e9
parente62f8f4ad2c8c2f498f5abfca57e8af8f7fed349 (diff)
document bio_register and bio_unregister
with help from jmc@
-rw-r--r--share/man/man9/Makefile9
-rw-r--r--share/man/man9/bio_register.965
2 files changed, 70 insertions, 4 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index 3aa8112c621..54a83ab7d74 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -1,11 +1,11 @@
-# $OpenBSD: Makefile,v 1.116 2006/07/02 11:54:10 sturm Exp $
+# $OpenBSD: Makefile,v 1.117 2006/11/27 17:00:09 dlg Exp $
# $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $
# Makefile for section 9 (kernel function and variable) manual pages.
-MAN= altq.9 audio.9 autoconf.9 boot.9 buffercache.9 bus_dma.9 bus_space.9 \
- copy.9 crypto.9 ctxsw.9 delay.9 disk.9 disklabel.9 \
- dohooks.9 dopowerhooks.9 \
+MAN= altq.9 audio.9 autoconf.9 bio_register.9 boot.9 buffercache.9 \
+ bus_dma.9 bus_space.9 copy.9 crypto.9 ctxsw.9 delay.9 disk.9 \
+ disklabel.9 dohooks.9 dopowerhooks.9 \
domountroothooks.9 doshutdownhooks.9 dostartuphooks.9 \
evcount.9 file.9 \
fork1.9 extent.9 getdevvp.9 getnewvnode.9 hash.9 hashinit.9 \
@@ -35,6 +35,7 @@ MLINKS+=autoconf.9 config_init.9 autoconf.9 config_search.9 \
autoconf.9 config_attach.9 autoconf.9 config_detach.9 \
autoconf.9 config_activate.9 autoconf.9 config_deactivate.9 \
autoconf.9 config_defer.9
+MLINKS+=bio_register.9 bio_unregister.9
MLINKS+=buffercache.9 bread.9 buffercache.9 breadn.9 \
buffercache.9 bwrite.9 buffercache.9 bawrite.9 \
buffercache.9 bdwrite.9 buffercache.9 getblk.9 \
diff --git a/share/man/man9/bio_register.9 b/share/man/man9/bio_register.9
new file mode 100644
index 00000000000..2424e556b27
--- /dev/null
+++ b/share/man/man9/bio_register.9
@@ -0,0 +1,65 @@
+.\" $OpenBSD: bio_register.9,v 1.1 2006/11/27 17:00:09 dlg Exp $
+.\"
+.\" Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd November 27, 2006
+.Dt BIO_REGISTER 9
+.Os
+.Sh NAME
+.Nm bio_register ,
+.Nm bio_unregister
+.Nd block IO ioctl tunnelling interface
+.Sh SYNOPSIS
+.In dev/biovar.h
+.Ft int
+.Fn bio_register "struct device *dev" "int (*bioctl)(void device *, u_long, caddr_t)"
+.Fn bio_unregister "struct device *dev"
+.Sh DESCRIPTION
+The block IO ioctl tunnelling interface is used by drivers to register and
+unregister ioctl handlers to be accessed via the
+.Xr bio 4
+device.
+.Pp
+.Fn bio_register
+is called by the driver represented by
+.Fa dev
+to register the
+.Fa bioctl
+argument as the ioctl handler for itself.
+.Pp
+.Fn bio_unregister
+is called to remove the ioctl handler previously registered with
+.Fn bio_register
+for the device represented by
+.Fa dev .
+.Pp
+.Fn bio_register
+and
+.Fn bio_unregister
+can be called during
+.Xr autoconf 9
+or from process context.
+The
+.Fa bioctl
+callback is called from process context.
+.Sh SEE ALSO
+.Xr bio 4 ,
+.Xr autoconf 9
+.Sh HISTORY
+The block IO ioctl tunnelling interface first appeared in
+.Ox 3.2 .
+.Sh AUTHORS
+The block IO ioctl tunnelling interface was written by
+.An Niklas Hallqvist Aq niklas@openbsd.org .