diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 19:55:15 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 19:55:15 -0400 |
| commit | 253e67c8b3a72b3a4757fdbc5845297628db0a4a (patch) | |
| tree | adf53b66087aa30dfbf8bf391a1dadb044c3bf4d /static/netbsd/man4/fd.4 | |
| parent | a9157ce950dfe2fc30795d43b9d79b9d1bffc48b (diff) | |
docs: Added All NetBSD Manuals
Diffstat (limited to 'static/netbsd/man4/fd.4')
| -rw-r--r-- | static/netbsd/man4/fd.4 | 171 |
1 files changed, 96 insertions, 75 deletions
diff --git a/static/netbsd/man4/fd.4 b/static/netbsd/man4/fd.4 index 4f437659..6ce938d6 100644 --- a/static/netbsd/man4/fd.4 +++ b/static/netbsd/man4/fd.4 @@ -1,7 +1,10 @@ -.\" $NetBSD: fd.4,v 1.6 2013/12/30 08:42:00 dholland Exp $ +.\" $NetBSD: fd.4,v 1.11 2010/03/22 18:58:31 joerg Exp $ .\" -.\" Copyright (c) 1990, 1991, 1993 -.\" The Regents of the University of California. All rights reserved. +.\" Copyright (c) 1996 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Paul Kranenburg. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -11,86 +14,104 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. .\" -.\" @(#)fd.4 8.1 (Berkeley) 6/9/93 +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 29, 2013 -.Dt FD 4 +.Dd June 23, 1996 +.Dt FD 4 sun3 .Os .Sh NAME -.Nm fd , -.Nm stdin , -.Nm stdout , -.Nm stderr -.Nd file descriptor files +.Nm fd +.Nd Sun 3/80 i82027 floppy disk drive controller driver +.Sh SYNOPSIS +.Cd "fdc0 at obio0" Pq sun3x +.Cd "fd* at fdc0" .Sh DESCRIPTION -The files -.Pa /dev/fd/0 -through -.Pa /dev/fd/# -refer to file descriptors which can be accessed through the file -system. -If the file descriptor is open and the mode the file is being opened -with is a subset of the mode of the existing descriptor, the call: -.Bd -literal -offset indent -fd = open("/dev/fd/0", mode); -.Ed +The +.Nm +driver is for the built-in floppy diskette drive run by the +.Tn Intel +i82027 controller found on the Sun 3/80. +.Pp +Bits +.Bq 0-3 +of the minor device number of the special files referring to this +device encode the floppy density as follows: +.Bl -tag -width indent -offset indent +.It 0 +3.5'' 1.44MB floppy diskettes. +.It 1 +3.5'' 720KB floppy diskettes. +.It 2 +3.5'' 360KB floppy diskettes. +.It 3 +3.5'' 1.2MB/NEC Japanese format floppy diskettes. +.El +.Sh FORMATTING +The driver supports floppy disk formatting using the interfaces in +.In sys/fdio.h : .Pp -and the call: -.Bd -literal -offset indent -fd = fcntl(0, F_DUPFD, 0); -.Ed +.Bl -tag -width FDIOCFORMAT_TRACK -compact +.It Dv FDIOCGETFORMAT Fa struct fdformat_parms +Fetch current formatting parameters. +This gets the default parameters +for the open device if no parameters have been set during the session. .Pp -are equivalent. +.It Dv FDIOCSETFORMAT Fa struct fdformat_parms +Set formatting parameters. +The driver saves this state and it persists while the device is open. .Pp -Opening the files -.Pa /dev/stdin , -.Pa /dev/stdout -and -.Pa /dev/stderr -is equivalent to the following calls: -.Bd -literal -offset indent -fd = fcntl(STDIN_FILENO, F_DUPFD, 0); -fd = fcntl(STDOUT_FILENO, F_DUPFD, 0); -fd = fcntl(STDERR_FILENO, F_DUPFD, 0); -.Ed +.It Dv FDIOCFORMAT_TRACK Fa struct fdformat_cmd +Format a track on the medium. +If this call returns +.Er EINVAL , +the track formatting parameters were out of range for the medium. +If it returns +.Er EIO , +there was a medium error while formatting the track. .Pp -Flags to the -.Xr open 2 -call other than -.Dv O_RDONLY , -.Dv O_WRONLY -and -.Dv O_RDWR -are ignored. -.Sh FILES -.Bl -tag -width /dev/stderr -compact -.It Pa /dev/fd/# -.It Pa /dev/stdin -.It Pa /dev/stdout -.It Pa /dev/stderr +.It Dv FDIOCSETOPTS Fa int +Set driver options which persist until the device is closed. +The +options should be the logical OR of the desired values below: +.Pp +.Bl -tag -width FDOPT_NORETRY -compact +.It Dv FDOPT_NORETRY +Do not retry operations on failure +.It Dv FDOPT_SILENT +Do not print error messages to the console +.El +.Pp +.It Dv FDIOCGETOPTS Fa int +Fetch drive options. .El +.Pp +A typical use of the formatting facilities would be to open the device, +call +.Dv FDIOCGETFORMAT +to fetch the current format parameters, perhaps +change a parameter or two, display the formatting details to the user, +and then call +.Dv FDIOCSETFORMAT +followed by a series of calls to +.Dv FDIOCFORMAT_TRACK . .Sh SEE ALSO -.Xr tty 4 , -.Xr mount_fdesc 8 -.Ss NOTE -The floppy disk driver on some ports is also called -.Nm fd ; -see -.Xr fdc 4 -for its documentation. +.Xr eject 1 , +.Xr fdformat 1 +.Sh HISTORY +The +.Nm +formatting support appeared in +.Nx 1.3 . +.Sh BUGS +Formatting appears to not work reliably on all machines. |
