xref: /openbsd/share/man/man4/diskmap.4 (revision fc61954a)
1.\"     $OpenBSD: diskmap.4,v 1.3 2015/09/10 17:55:21 schwarze Exp $
2.\"
3.\" Copyright (c) 2010 Joel Sing <jsing@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: September 10 2015 $
18.Dt DISKMAP 4
19.Os
20.Sh NAME
21.Nm diskmap
22.Nd disklabel UID mapping interface
23.Sh SYNOPSIS
24.In sys/dkio.h
25.Sh DESCRIPTION
26The
27.Nm
28driver provides userland applications with a means to map a disklabel UID to
29an actual device and open that device in one atomic operation.
30This is achieved via the DIOCMAP
31.Xr ioctl 2
32command.
33.Pp
34The ability to use a disklabel UID is helpful in situations
35where a disk may appear to the operating system under different device names.
36For example,
37plugging USB keys into differently configured systems (think sd0 or sd1),
38or swapping between IDE and AHCI on a disk controller (wd0 or sd0).
39Although the device names may change,
40the operating system is still able to identify the disk by its UID.
41.Sh FILES
42.Bl -tag -width /dev/diskmap -compact
43.It Pa /dev/diskmap
44diskmap device
45.El
46.Sh SEE ALSO
47.Xr ioctl 2 ,
48.Xr disklabel 8
49.Sh HISTORY
50The
51.Nm
52driver first appeared in
53.Ox 4.8 .
54.Sh AUTHORS
55The
56.Nm
57driver was written by
58.An Joel Sing .
59