xref: /illumos-gate/usr/src/man/man4fs/devfs.4fs (revision d17be682a2c70b4505d43c830bbd2603da11918d)
1.\"
2.\" Copyright (c) 2004 Sun Microsystems, Inc.  All Rights Reserved.
3.\" Copyright 2021 Oxide compuer Company
4.\"
5.\" The contents of this file are subject to the terms of the
6.\" Common Development and Distribution License (the "License").
7.\" You may not use this file except in compliance with the License.
8.\"
9.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10.\" or http://www.opensolaris.org/os/licensing.
11.\" See the License for the specific language governing permissions
12.\" and limitations under the License.
13.\"
14.\" When distributing Covered Code, include this CDDL HEADER in each
15.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16.\" If applicable, add the following below this CDDL HEADER, with the
17.\" fields enclosed by brackets "[]" replaced with your own identifying
18.\" information: Portions Copyright [yyyy] [name of copyright owner]
19.\"
20.Dd November 29, 2021
21.Dt DEVFS 4FS
22.Os
23.Sh NAME
24.Nm devfs
25.Nd Devices file system
26.Sh DESCRIPTION
27The
28.Nm
29filesystem manages a name space of all devices in the operating environment and
30is mounted during boot on the
31.Pa /devices
32name space.
33.Pp
34The
35.Pa /devices
36name space is dynamic and reflects the current state of accessible devices.
37The names of all attached device instances are present under
38.Pa /devices .
39.Pp
40The content under
41.Pa /devices
42is under the exclusive control of the
43.Nm
44filesystem and cannot be changed.
45.Pp
46The system may be configured to include a device in one of two ways:
47.Bl -enum
48.It
49By means of dynamic reconfiguration
50.Pq DR ,
51using, for example,
52.Xr cfgadm 8 .
53Several different hardware buses such as PCIe and USB automatically discover and
54enumerate devices that they encounter.
55.It
56For devices driven by
57.Xr driver.conf 5
58enumeration, edit the
59.Pa driver.conf
60file to add a new entry, then use
61.Xr update_drv 8
62to cause the system to re-read the
63.Pa driver.conf
64file and thereby enumerate the instance.
65.El
66.Pp
67The device may be attached through a number of system calls and programs,
68including
69.Xr open 2 ,
70.Xr stat 2 ,
71and
72.Xr ls 1 .
73During device attach, the device driver typically creates minor nodes
74corresponding to the device via
75.Xr ddi_create_minor_node 9F .
76If the attach is successful, one or more minor nodes referring to the device are
77created under
78.Pa /devices .
79.Pp
80Operations like
81.Xr mknod 2 ,
82.Xr mkdir 2 ,
83and
84.Xr creat 2
85are not supported in
86.Pa /devices .
87.Pp
88This file system is not present in a non-global zone.
89.Sh FILES
90.Bl -tag -width Pa
91.It Pa /devices
92Mount point for
93.Nm
94file system in the global zone.
95.El
96.Sh SEE ALSO
97.Xr vfstab 5 ,
98.Xr devfsadm 8 ,
99.Xr attach 9E
100.Sh NOTES
101The
102.Pa /devices
103name space cannot be unmounted.
104.Pp
105All content at or below the
106.Pa /devices
107name space is an implementation
108artifact and subject to incompatible change or removal without notification.
109Generally, user programs should leverage the device name space under
110.Pa /dev .
111