summaryrefslogtreecommitdiffstats
path: root/share/man/man4/devctl.4
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2003-02-24 22:53:26 +0000
committerru <ru@FreeBSD.org>2003-02-24 22:53:26 +0000
commit0dea5415679a9db700f2846b28d2d8ff833032c7 (patch)
tree9409aa78bd0bf64293f9e45238d4a82861b7663b /share/man/man4/devctl.4
parent83d0e58172de7563f59519892b23c2fd0e80ca56 (diff)
downloadFreeBSD-src-0dea5415679a9db700f2846b28d2d8ff833032c7.zip
FreeBSD-src-0dea5415679a9db700f2846b28d2d8ff833032c7.tar.gz
mdoc(7) police: Scheduled sweep.
Diffstat (limited to 'share/man/man4/devctl.4')
-rw-r--r--share/man/man4/devctl.475
1 files changed, 49 insertions, 26 deletions
diff --git a/share/man/man4/devctl.4 b/share/man/man4/devctl.4
index b2ea80f..e4eb5ef 100644
--- a/share/man/man4/devctl.4
+++ b/share/man/man4/devctl.4
@@ -22,35 +22,49 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD$
+.\" $FreeBSD$
.\"
.Dd February 11, 2003
.Dt DEVCTL 4
.Os
.Sh NAME
.Nm devctl
-.Nd Device event reporting and device control interface.
+.Nd "device event reporting and device control interface"
.Sh DESCRIPTION
The
.Nm
device is used to report device events from the kernel.
Future versions will allow for some device control as well.
.Sh IMPLEMENTATION NOTES
-This design allows only one reader for /dev/devctl.
+This design allows only one reader for
+.Pa /dev/devctl .
This is not desirable
in the long run, but will get a lot of hair out of this implementation.
Maybe we should make this device a clonable device.
.Pp
-Also note: we specifically do not attach a device to the device_t tree
+Also note: we specifically do not attach a device to the
+.Vt device_t
+tree
to avoid potential chicken and egg problems.
One could argue that all of this belongs to the root node.
-One could also further argue that the sysctl interface that we have
-not might more properly be an ioctl interface.
+One could also further argue that the
+.Xr sysctl 3
+interface that we have now might more properly be an
+.Xr ioctl 2
+interface.
.Pp
-SIGIO support is included in the driver.
-However, the author is not sure that the SIGIO support is done correctly.
-It was copied from a driver that had SIGIO support that likely hasn't been
-tested since 3.4 or 2.2.8!
+.Dv SIGIO
+support is included in the driver.
+However, the author is not sure that the
+.Dv SIGIO
+support is done correctly.
+It was copied from a driver that had
+.Dv SIGIO
+support that likely has not been
+tested since
+.Fx 3.4
+or
+.Fx 2.2.8 !
.Pp
The read channel for this device is used to report changes to
userland in realtime.
@@ -59,39 +73,49 @@ If you try to read this device a character at a time, you will loose
the rest of the data.
Listening programs are expected to cope.
.Pp
-The sysctl and boot parameter hw.bus.devctl_disable is used to disable
+The sysctl and boot parameter
+.Va hw.bus.devctl_disable
+is used to disable
.Nm
-when no devd is running.
+when no
+.Xr devd 8
+is running.
.Sh PROTOCOL
+The
.Nm
-uses an ASCII protocol.
+device
+uses an
+.Tn ASCII
+protocol.
The driver returns one record at a time to its readers.
Each record is terminated with a newline.
The first character of the record is the event type.
.Pp
.Bl -column -compact "Type" "Description"
.Em "Type Description"
-+ Device node in tree attached
-- Device node in tree detached
-? Unknown device detected
++ Device node in tree attached.
+- Device node in tree detached.
+? Unknown device detected.
.El
-.Ss Message formats
+.Ss Message Formats
Except for the first character in the record, attach and detach
messages have the same format.
-.D1 Tdev at parent on location
-.Bl -column -compact "Part" "Description"
+.Pp
+.D1 Ar T Ns Ar dev Li at Ar parent Li on Ar location
+.Pp
+.Bl -column -compact "location" "Description"
.Em "Part Description"
-T + or -
-dev The device name that was attached/detached
-parent The device name of the parent bus that attached the device
-location Bus specific location information
+.It Ar T Ta "+ or -"
+.It Ar dev Ta "The device name that was attached/detached."
+.It Ar parent Ta "The device name of the parent bus that attached the device."
+.It Ar location Ta "Bus specific location information."
.El
.Pp
The nomatch messages can be used to load devices driver.
If you load a device driver, then one of two things can happen.
-If the device driver attaches to something, you'll get a device
+If the device driver attaches to something, you will get a device
attached message.
-If it doesn't, then nothing will happen.
+If it does not, then nothing will happen.
.Pp
The attach and detach messages arrive after the event.
This means one cannot use the attach message to load an alternate
@@ -101,4 +125,3 @@ One cannot use the detach messages to flush data to the device.
The device is already gone.
.Sh SEE ALSO
.Xr devd 8
-
OpenPOWER on IntegriCloud