From d15a9b6dbc6b83e6f86d97ad50386507b0b38d15 Mon Sep 17 00:00:00 2001 From: krw <> Date: Mon, 3 Jan 2011 14:26:51 +0000 Subject: [PATCH] Update to better describe reality, i.e. disklabel(8) UID usage. ok jmc@ jsing@ --- src/lib/libutil/opendev.3 | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/src/lib/libutil/opendev.3 b/src/lib/libutil/opendev.3 index 08b06138..ce4eb3fa 100644 --- a/src/lib/libutil/opendev.3 +++ b/src/lib/libutil/opendev.3 @@ -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) 1996, Jason Downs. All rights reserved. @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: December 17 2010 $ +.Dd $Mdocdate: January 3 2011 $ .Dt OPENDEV 3 .Os .Sh NAME @@ -37,23 +37,35 @@ .Sh DESCRIPTION The .Fn opendev -function opens a device using the +function opens a device using a .Dq short form -name. -This is typically +name or +.Xr disklabel 8 +UID +.Pq DUID . +For instance .Dq sd0 or -.Dq sd0c , -for instance, which will be expanded to +.Dq sd0c +will be expanded to .Pa /dev/rsd0c on most architectures. .Pp Device name lookup is done by first checking .Fa path for a -.Dq / +.Sq / 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 is searched for a matching device. .Pp @@ -86,7 +98,9 @@ return value and errors are the same as the return value and errors of .Xr open 2 . .Sh SEE ALSO .Xr open 2 , -.Xr getrawpartition 3 +.Xr getrawpartition 3 , +.Xr diskmap 4 , +.Xr disklabel 8 .Sh HISTORY The .Fn opendev