summaryrefslogtreecommitdiff
path: root/usr/src/man/man9e/open.9e
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/man/man9e/open.9e')
-rw-r--r--usr/src/man/man9e/open.9e44
1 files changed, 3 insertions, 41 deletions
diff --git a/usr/src/man/man9e/open.9e b/usr/src/man/man9e/open.9e
index 9d73b7d4c0..94ac13d2d3 100644
--- a/usr/src/man/man9e/open.9e
+++ b/usr/src/man/man9e/open.9e
@@ -4,7 +4,7 @@
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH open 9E "24 Apr 2008" "SunOS 5.11" "Driver Entry Points"
+.TH OPEN 9E "Apr 24, 2008"
.SH NAME
open \- gain access to a device
.SH SYNOPSIS
@@ -21,7 +21,7 @@ open \- gain access to a device
-\fBint prefix\fR\fBopen\fR(\fBdev_t *\fR\fIdevp\fR, \fBint\fR \fIflag\fR, \fBint\fR \fIotyp\fR,
+\fBint prefix\fR\fBopen\fR(\fBdev_t *\fR\fIdevp\fR, \fBint\fR \fIflag\fR, \fBint\fR \fIotyp\fR,
\fBcred_t *\fR\fIcred_p\fR);
.fi
@@ -35,7 +35,7 @@ open \- gain access to a device
-\fBint prefix\fR\fBopen\fR(\fBqueue_t *\fR\fIq\fR, \fBdev_t *\fR\fIdevp\fR, \fBint\fR \fIoflag\fR, \fBint\fR \fIsflag\fR,
+\fBint prefix\fR\fBopen\fR(\fBqueue_t *\fR\fIq\fR, \fBdev_t *\fR\fIdevp\fR, \fBint\fR \fIoflag\fR, \fBint\fR \fIsflag\fR,
\fBcred_t *\fR\fIcred_p\fR);
.fi
@@ -48,69 +48,57 @@ it can be \fBnulldev\fR(9F)
.SS "Block and Character"
.sp
.ne 2
-.mk
.na
\fB\fIdevp\fR\fR
.ad
.RS 10n
-.rt
Pointer to a device number.
.RE
.sp
.ne 2
-.mk
.na
\fB\fIflag\fR\fR
.ad
.RS 10n
-.rt
A bit field passed from the user program \fBopen\fR(2) system call that
instructs the driver on how to open the file. Valid settings are:
.sp
.ne 2
-.mk
.na
\fB\fBFEXCL\fR\fR
.ad
.RS 11n
-.rt
Open the device with exclusive access; fail all other attempts to open the
device.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBFNDELAY\fR\fR
.ad
.RS 11n
-.rt
Open the device and return immediately. Do not block the open even if something
is wrong.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBFREAD\fR\fR
.ad
.RS 11n
-.rt
Open the device with read-only permission, If \fBOR\fRed with \fBFWRITE\fR,
allow both read and write access.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBFWRITE\fR\fR
.ad
.RS 11n
-.rt
Open a device with write-only permission. If ORed with \fBFREAD\fR, allow both
read and write access.
.RE
@@ -119,12 +107,10 @@ read and write access.
.sp
.ne 2
-.mk
.na
\fB\fIotyp\fR\fR
.ad
.RS 10n
-.rt
Parameter supplied for driver to determine how many times a device was opened
and for what reasons. For \fBOTYP_BLK\fR and \fBOTYP_CHR\fR, the \fBopen()\fR
function can be called many times, but the \fBclose\fR(9E) function is called
@@ -137,34 +123,28 @@ This permits software drivers to exist above hardware drivers and removes any
ambiguity from the hardware driver regarding how a device is used.
.sp
.ne 2
-.mk
.na
\fB\fBOTYP_BLK\fR\fR
.ad
.RS 12n
-.rt
Open occurred through block interface for the device.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBOTYP_CHR\fR\fR
.ad
.RS 12n
-.rt
Open occurred through the raw/character interface for the device.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBOTYP_LYR\fR\fR
.ad
.RS 12n
-.rt
Open a layered process. This flag is used when one driver calls another
driver's \fBopen()\fR or \fBclose\fR(9E) function. The calling driver ensures
that there is one-layered close for each layered open. This flag applies to
@@ -175,35 +155,29 @@ both block and character devices.
.sp
.ne 2
-.mk
.na
\fB\fIcred_p\fR\fR
.ad
.RS 10n
-.rt
Pointer to the user credential structure.
.RE
.SS "STREAMS"
.sp
.ne 2
-.mk
.na
\fB\fIq\fR\fR
.ad
.RS 10n
-.rt
A pointer to the read \fBqueue\fR.
.RE
.sp
.ne 2
-.mk
.na
\fB\fIdevp\fR\fR
.ad
.RS 10n
-.rt
Pointer to a device number. For \fBSTREAMS \fRmodules, \fIdevp\fR always points
to the device number associated with the driver at the end (tail) of the
stream.
@@ -211,12 +185,10 @@ stream.
.sp
.ne 2
-.mk
.na
\fB\fIoflag\fR\fR
.ad
.RS 10n
-.rt
Valid \fIoflag\fR values are \fBFEXCL\fR, \fBFNDELAY\fR, \fBFREAD\fR, and
\fBFWRITEL\fR \(em the same as those listed above for \fIflag.\fR. For
\fBSTREAMS\fR modules, \fIoflag\fR is always set to \fB0\fR.
@@ -224,33 +196,27 @@ Valid \fIoflag\fR values are \fBFEXCL\fR, \fBFNDELAY\fR, \fBFREAD\fR, and
.sp
.ne 2
-.mk
.na
\fB\fIsflag\fR\fR
.ad
.RS 10n
-.rt
Valid values are as follows:
.sp
.ne 2
-.mk
.na
\fB\fBCLONEOPEN\fR\fR
.ad
.RS 13n
-.rt
Indicates that the \fBopen()\fR function is called through the clone driver.
The driver should return a unique device number.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBMODOPEN\fR\fR
.ad
.RS 13n
-.rt
Modules should be called with \fIsflag\fR set to this value. Modules should
return an error if they are called with \fIsflag\fR set to a different value.
Drivers should return an error if they are called with \fIsflag\fR set to this
@@ -259,12 +225,10 @@ value.
.sp
.ne 2
-.mk
.na
\fB\fB0\fR\fR
.ad
.RS 13n
-.rt
Indicates a driver is opened directly, without calling the clone driver.
.RE
@@ -272,12 +236,10 @@ Indicates a driver is opened directly, without calling the clone driver.
.sp
.ne 2
-.mk
.na
\fB\fIcred_p\fR\fR
.ad
.RS 10n
-.rt
Pointer to the user credential structure.
.RE