9022 loader.efi: module placement must check memory map
[unleashed.git] / share / man / man9p / removable-media.9p
blob5aca8a6ff049cad01d933a5e362031357decc841
1 '\" te
2 .\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved.
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH REMOVABLE-MEDIA 9P "Jun 15, 2001"
7 .SH NAME
8 removable-media \- removable media device property
9 .SH DESCRIPTION
10 .sp
11 .LP
12 A device that supports removable media\(emsuch as CDROM, JAZZ, and ZIP
13 drives\(emand that supports power management and expects automatic mounting of
14 the device via the volume manager should export the boolean (zero length)
15 property \fBremovable-media\fR. This property enables the system to make the
16 power state of the device dependent on the power state of the frame buffer and
17 monitor. See the \fBpower.conf\fR(4) discussion of the
18 \fBdevice-dependency-property\fR entry for more information.
19 .sp
20 .LP
21 Devices that behave like removable devices (such as PC \fBATA\fR cards, where
22 the controller and media both are removed at the same time) should also export
23 this property.
24 .SH EXAMPLES
25 .LP
26 \fBExample 1 \fR\fBremovable-media\fR Entry
27 .sp
28 .LP
29 An example of a \fBremovable-media\fR entry from the \fB\&.conf\fR file of a
30 driver is shown below.
32 .sp
33 .in +2
34 .nf
35 # This entry keeps removable media from being powered down unless
36 # the console framebuffer and monitor are powered down
38 removable-media=1;
39 .fi
40 .in -2
42 .LP
43 \fBExample 2 \fRImplementation in \fBattach()\fR
44 .sp
45 .LP
46 Below is an example of how the entry above would be implemented in the
47 \fBattach\fR(9E) function of the driver.
49 .sp
50 .in +2
51 .nf
52 xxattach(dev_info_t *dip, ddi_attach_cmd_t cmd)
53      {
54      ...
55           if (ddi_prop_create(DDI_DEV_T_NONE, dip, DDI_PROP_CANSLEEP,
56               "removable-media", NULL, 0)) != DDI_PROP_SUCCESS)
57                goto failed;
58      ...
59      }
60 .fi
61 .in -2
63 .SH ATTRIBUTES
64 .sp
65 .LP
66 See \fBattributes\fR(5) for descriptions of the following attributes:
67 .sp
69 .sp
70 .TS
71 box;
72 c | c
73 l | l .
74 ATTRIBUTE TYPE  ATTRIBUTE VALUE
76 Interface stability     Committed
77 .TE
79 .SH SEE ALSO
80 .sp
81 .LP
82 \fBpower.conf\fR(4), \fBpm\fR(7D), \fBattach\fR(9E), \fBdetach\fR(9E),
83 \fBddi_prop_create\fR(9F)
84 .sp
85 .LP
86 \fIWriting Device Drivers\fR