1removable-media(9P) Kernel Properties for Drivers removable-media(9P)
2
3
4
6 removable-media - removable media device property
7
9 A device that supports removable media—such as CDROM, JAZZ, and ZIP
10 drives—and that supports power management and expects automatic mount‐
11 ing of the device via the volume manager should export the boolean
12 (zero length) property removable-media. This property enables the sys‐
13 tem to make the power state of the device dependent on the power state
14 of the frame buffer and monitor. See the power.conf(4) discussion of
15 the device-dependency-property entry for more information.
16
17
18 Devices that behave like removable devices (such as PC ATA cards, where
19 the controller and media both are removed at the same time) should also
20 export this property.
21
23 Example 1 removable-media Entry
24
25
26 An example of a removable-media entry from the .conf file of a driver
27 is shown below.
28
29
30 # This entry keeps removable media from being powered down unless
31 # the console framebuffer and monitor are powered down
32 #
33 removable-media=1;
34
35
36 Example 2 Implementation in attach()
37
38
39 Below is an example of how the entry above would be implemented in the
40 attach(9E) function of the driver.
41
42
43 xxattach(dev_info_t *dip, ddi_attach_cmd_t cmd)
44 {
45 ...
46 if (ddi_prop_create(DDI_DEV_T_NONE, dip, DDI_PROP_CANSLEEP,
47 "removable-media", NULL, 0)) != DDI_PROP_SUCCESS)
48 goto failed;
49 ...
50 }
51
52
54 See attributes(5) for descriptions of the following attributes:
55
56
57
58
59 ┌─────────────────────────────┬─────────────────────────────┐
60 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
61 ├─────────────────────────────┼─────────────────────────────┤
62 │Interface stability │Committed │
63 └─────────────────────────────┴─────────────────────────────┘
64
66 power.conf(4), pm(7D), attach(9E), detach(9E), ddi_prop_create(9F)
67
68
69 Writing Device Drivers
70
71
72
73SunOS 5.11 15 Jun 2001 removable-media(9P)