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