|
@ -1,4 +1,4 @@ |
|
|
.\" $OpenBSD: opendev.3,v 1.19 2010/12/17 19:35:34 millert Exp $ |
|
|
|
|
|
|
|
|
.\" $OpenBSD: opendev.3,v 1.20 2011/01/03 14:26:51 krw Exp $ |
|
|
.\" |
|
|
.\" |
|
|
.\" Copyright (c) 2000, Todd C. Miller. All rights reserved. |
|
|
.\" Copyright (c) 2000, Todd C. Miller. All rights reserved. |
|
|
.\" Copyright (c) 1996, Jason Downs. All rights reserved. |
|
|
.\" Copyright (c) 1996, Jason Downs. All rights reserved. |
|
@ -24,7 +24,7 @@ |
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
|
.\" SUCH DAMAGE. |
|
|
.\" SUCH DAMAGE. |
|
|
.\" |
|
|
.\" |
|
|
.Dd $Mdocdate: December 17 2010 $ |
|
|
|
|
|
|
|
|
.Dd $Mdocdate: January 3 2011 $ |
|
|
.Dt OPENDEV 3 |
|
|
.Dt OPENDEV 3 |
|
|
.Os |
|
|
.Os |
|
|
.Sh NAME |
|
|
.Sh NAME |
|
@ -37,23 +37,35 @@ |
|
|
.Sh DESCRIPTION |
|
|
.Sh DESCRIPTION |
|
|
The |
|
|
The |
|
|
.Fn opendev |
|
|
.Fn opendev |
|
|
function opens a device using the |
|
|
|
|
|
|
|
|
function opens a device using a |
|
|
.Dq short form |
|
|
.Dq short form |
|
|
name. |
|
|
|
|
|
This is typically |
|
|
|
|
|
|
|
|
name or |
|
|
|
|
|
.Xr disklabel 8 |
|
|
|
|
|
UID |
|
|
|
|
|
.Pq DUID . |
|
|
|
|
|
For instance |
|
|
.Dq sd0 |
|
|
.Dq sd0 |
|
|
or |
|
|
or |
|
|
.Dq sd0c , |
|
|
|
|
|
for instance, which will be expanded to |
|
|
|
|
|
|
|
|
.Dq sd0c |
|
|
|
|
|
will be expanded to |
|
|
.Pa /dev/rsd0c |
|
|
.Pa /dev/rsd0c |
|
|
on most architectures. |
|
|
on most architectures. |
|
|
.Pp |
|
|
.Pp |
|
|
Device name lookup is done by first checking |
|
|
Device name lookup is done by first checking |
|
|
.Fa path |
|
|
.Fa path |
|
|
for a |
|
|
for a |
|
|
.Dq / |
|
|
|
|
|
|
|
|
.Sq / |
|
|
and if one is found attempting to open that file. |
|
|
and if one is found attempting to open that file. |
|
|
Otherwise |
|
|
|
|
|
|
|
|
If not, |
|
|
|
|
|
.Fa path |
|
|
|
|
|
is checked to see if it is a valid DUID. |
|
|
|
|
|
If it is, the corresponding device is obtained via |
|
|
|
|
|
.Xr diskmap 4 . |
|
|
|
|
|
If |
|
|
|
|
|
.Fa path |
|
|
|
|
|
has no |
|
|
|
|
|
.Sq / |
|
|
|
|
|
and is not a DUID, |
|
|
.Fa /dev |
|
|
.Fa /dev |
|
|
is searched for a matching device. |
|
|
is searched for a matching device. |
|
|
.Pp |
|
|
.Pp |
|
@ -86,7 +98,9 @@ return value and errors are the same as the return value and errors of |
|
|
.Xr open 2 . |
|
|
.Xr open 2 . |
|
|
.Sh SEE ALSO |
|
|
.Sh SEE ALSO |
|
|
.Xr open 2 , |
|
|
.Xr open 2 , |
|
|
.Xr getrawpartition 3 |
|
|
|
|
|
|
|
|
.Xr getrawpartition 3 , |
|
|
|
|
|
.Xr diskmap 4 , |
|
|
|
|
|
.Xr disklabel 8 |
|
|
.Sh HISTORY |
|
|
.Sh HISTORY |
|
|
The |
|
|
The |
|
|
.Fn opendev |
|
|
.Fn opendev |
|
|