BIO_REGISTER(9) | Kernel Developer's Manual | BIO_REGISTER(9)

# NAME

`bio_register`, `bio_unregister` — block I/O ioctl tunnelling interface

# SYNOPSIS

`#include <dev/biovar.h>`

int
`bio_register`(struct device *dev, int (*bioctl)(struct device *, u_long, caddr_t));

void
`bio_unregister`(struct device *dev);

# DESCRIPTION

The block I/O ioctl tunnelling interface is used by drivers to register and unregister ioctl handlers to be accessed via the bio(4) device.

`bio_register`() is called by the driver represented by dev to register the bioctl argument as the ioctl handler for itself.

`bio_unregister`() is called to remove the ioctl handler previously registered with `bio_register`() for the device represented by dev.

`bio_register`() and `bio_unregister`() can be called during autoconf(9) or from process context. The bioctl callback is called from process context.

# SEE ALSO

bio(4), autoconf(9)

# HISTORY

The block I/O ioctl tunnelling interface first appeared in OpenBSD 3.2.

# AUTHORS

The block I/O ioctl tunnelling interface was written by Niklas Hallqvist <niklas@openbsd.org>.

September 14, 2015 | Debian