xref: /freebsd/share/man/man9/make_dev.9 (revision 580a458787646012ff4fb480c5c7278896de5491)
194b1839dSChris Costello.\" Copyright (c) 1999 Chris Costello
294b1839dSChris Costello.\" All rights reserved.
394b1839dSChris Costello.\"
494b1839dSChris Costello.\" Redistribution and use in source and binary forms, with or without
594b1839dSChris Costello.\" modification, are permitted provided that the following conditions
694b1839dSChris Costello.\" are met:
794b1839dSChris Costello.\" 1. Redistributions of source code must retain the above copyright
894b1839dSChris Costello.\"    notice, this list of conditions and the following disclaimer.
994b1839dSChris Costello.\" 2. Redistributions in binary form must reproduce the above copyright
1094b1839dSChris Costello.\"    notice, this list of conditions and the following disclaimer in the
1194b1839dSChris Costello.\"    documentation and/or other materials provided with the distribution.
1294b1839dSChris Costello.\"
1394b1839dSChris Costello.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1494b1839dSChris Costello.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1594b1839dSChris Costello.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1694b1839dSChris Costello.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1794b1839dSChris Costello.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1894b1839dSChris Costello.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1994b1839dSChris Costello.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2094b1839dSChris Costello.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2194b1839dSChris Costello.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2294b1839dSChris Costello.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2394b1839dSChris Costello.\" SUCH DAMAGE.
2494b1839dSChris Costello.\"
2594b1839dSChris Costello.\" $FreeBSD$
2694b1839dSChris Costello.\"
27*580a4587SAndrey V. Elsukov.Dd May 3, 2011
2894b1839dSChris Costello.Dt MAKE_DEV 9
29aa12cea2SUlrich Spörlein.Os
3094b1839dSChris Costello.Sh NAME
3194b1839dSChris Costello.Nm make_dev ,
32fe754649SKonstantin Belousov.Nm make_dev_cred ,
33fe754649SKonstantin Belousov.Nm make_dev_credf ,
34f36575b5SJaakko Heinonen.Nm make_dev_p ,
35f14b89faSDima Dorfman.Nm make_dev_alias ,
368137364fSAndrey V. Elsukov.Nm make_dev_alias_p ,
37f14b89faSDima Dorfman.Nm destroy_dev ,
38fe754649SKonstantin Belousov.Nm destroy_dev_sched ,
39fe754649SKonstantin Belousov.Nm destroy_dev_sched_cb ,
40fe754649SKonstantin Belousov.Nm destroy_dev_drain ,
4144c63b64SDima Dorfman.Nm dev_depends
42e3718e31SRuslan Ermilov.Nd manage
43c97dc39fSChristian Brueffer.Vt cdev Ns 's
44e3718e31SRuslan Ermilovand DEVFS registration for devices
4594b1839dSChris Costello.Sh SYNOPSIS
46212c98aaSBruce Evans.In sys/param.h
4732eef9aeSRuslan Ermilov.In sys/conf.h
48097fcfebSWarner Losh.Ft struct cdev *
49edde8745SEd Schouten.Fn make_dev "struct cdevsw *cdevsw" "int unit" "uid_t uid" "gid_t gid" "int perms" "const char *fmt" ...
50097fcfebSWarner Losh.Ft struct cdev *
51edde8745SEd Schouten.Fn make_dev_cred "struct cdevsw *cdevsw" "int unit" "struct ucred *cr" "uid_t uid" "gid_t gid" "int perms" "const char *fmt" ...
52fe754649SKonstantin Belousov.Ft struct cdev *
53edde8745SEd Schouten.Fn make_dev_credf "int flags" "struct cdevsw *cdevsw" "int unit" "struct ucred *cr" "uid_t uid" "gid_t gid" "int perms" "const char *fmt" ...
54f36575b5SJaakko Heinonen.Ft int
55f36575b5SJaakko Heinonen.Fn make_dev_p "int flags" "struct cdev **cdev" "struct cdevsw *devsw" "struct ucred *cr" "uid_t uid" "gid_t gid" "int mode" "const char *fmt" ...
56fe754649SKonstantin Belousov.Ft struct cdev *
5774c9ea0cSJohn-Mark Gurney.Fn make_dev_alias "struct cdev *pdev" "const char *fmt" ...
588137364fSAndrey V. Elsukov.Ft int
598137364fSAndrey V. Elsukov.Fn make_dev_alias_p "int flags" "struct cdev **cdev" "struct cdev *pdev" "const char *fmt" ...
6094b1839dSChris Costello.Ft void
61097fcfebSWarner Losh.Fn destroy_dev "struct cdev *dev"
62f14b89faSDima Dorfman.Ft void
63fe754649SKonstantin Belousov.Fn destroy_dev_sched "struct cdev *dev"
64fe754649SKonstantin Belousov.Ft void
65fe754649SKonstantin Belousov.Fn destroy_dev_sched_cb "struct cdev *dev" "void (*cb)(void *)" "void *arg"
66fe754649SKonstantin Belousov.Ft void
67fe754649SKonstantin Belousov.Fn destroy_dev_drain "struct cdevsw *csw"
68fe754649SKonstantin Belousov.Ft void
69097fcfebSWarner Losh.Fn dev_depends "struct cdev *pdev" "struct cdev *cdev"
7094b1839dSChris Costello.Sh DESCRIPTION
7194b1839dSChris CostelloThe
72fe754649SKonstantin Belousov.Fn make_dev_credf
7394b1839dSChris Costellofunction creates a
74c97dc39fSChristian Brueffer.Fa cdev
75a0942a60SHiten Pandyastructure for a new device.
76fe754649SKonstantin BelousovIt also notifies
77fe754649SKonstantin Belousov.Xr devfs 5
78fe754649SKonstantin Belousovof the presence of the new device, that causes corresponding nodes
79fe754649SKonstantin Belousovto be created.
80fe754649SKonstantin BelousovBesides this, a
81fe754649SKonstantin Belousov.Xr devctl 4
82fe754649SKonstantin Belousovnotification is sent.
83a0942a60SHiten PandyaThe device will be owned by
8494b1839dSChris Costello.Va uid ,
8594b1839dSChris Costellowith the group ownership as
861dfbd9c2SWarner Losh.Va gid .
871dfbd9c2SWarner LoshThe name is the expansion of
881dfbd9c2SWarner Losh.Va fmt
891dfbd9c2SWarner Loshand following arguments as
901dfbd9c2SWarner Losh.Xr printf 9
911dfbd9c2SWarner Loshwould print it.
921dfbd9c2SWarner LoshThe name determines its path under
931dfbd9c2SWarner Losh.Pa /dev
941dfbd9c2SWarner Loshor other
951dfbd9c2SWarner Losh.Xr devfs 5
961dfbd9c2SWarner Loshmount point and may contain slash
971dfbd9c2SWarner Losh.Ql /
981dfbd9c2SWarner Loshcharacters to denote subdirectories.
9994b1839dSChris CostelloThe permissions of the file specified in
10094b1839dSChris Costello.Va perms
10194b1839dSChris Costelloare defined in
102fe08efe6SRuslan Ermilov.In sys/stat.h :
10394b1839dSChris Costello.Pp
10494b1839dSChris Costello.Bd -literal -offset indent -compact
10594b1839dSChris Costello#define S_IRWXU 0000700    /* RWX mask for owner */
10694b1839dSChris Costello#define S_IRUSR 0000400    /* R for owner */
10794b1839dSChris Costello#define S_IWUSR 0000200    /* W for owner */
10894b1839dSChris Costello#define S_IXUSR 0000100    /* X for owner */
10994b1839dSChris Costello
11094b1839dSChris Costello#define S_IRWXG 0000070    /* RWX mask for group */
11194b1839dSChris Costello#define S_IRGRP 0000040    /* R for group */
11294b1839dSChris Costello#define S_IWGRP 0000020    /* W for group */
11394b1839dSChris Costello#define S_IXGRP 0000010    /* X for group */
11494b1839dSChris Costello
11594b1839dSChris Costello#define S_IRWXO 0000007    /* RWX mask for other */
11694b1839dSChris Costello#define S_IROTH 0000004    /* R for other */
11794b1839dSChris Costello#define S_IWOTH 0000002    /* W for other */
11894b1839dSChris Costello#define S_IXOTH 0000001    /* X for other */
11994b1839dSChris Costello
12094b1839dSChris Costello#define S_ISUID 0004000    /* set user id on execution */
12194b1839dSChris Costello#define S_ISGID 0002000    /* set group id on execution */
12294b1839dSChris Costello#define S_ISVTX 0001000    /* sticky bit */
12394b1839dSChris Costello#ifndef _POSIX_SOURCE
12494b1839dSChris Costello#define S_ISTXT 0001000
12594b1839dSChris Costello#endif
12694b1839dSChris Costello.Ed
12794b1839dSChris Costello.Pp
12894b1839dSChris CostelloThe
129fe754649SKonstantin Belousov.Va cr
130fe754649SKonstantin Belousovargument specifies credentials that will be stored in the
131fe754649SKonstantin Belousov.Fa si_cred
132fe754649SKonstantin Belousovmember of the initialized
133fe754649SKonstantin Belousov.Fa struct cdev .
134fe754649SKonstantin BelousovThe
135fe754649SKonstantin Belousov.Va flags
136fe754649SKonstantin Belousovargument alters the operation of
137f36575b5SJaakko Heinonen.Fn make_dev_credf
138f36575b5SJaakko Heinonenor
139f36575b5SJaakko Heinonen.Fn make_dev_p .
140fe754649SKonstantin BelousovThe following values are currently accepted:
141fe754649SKonstantin Belousov.Pp
14268f7a013SJaakko Heinonen.Bl -tag -width "MAKEDEV_CHECKNAME" -compact -offset indent
14368f7a013SJaakko Heinonen.It MAKEDEV_REF
14468f7a013SJaakko Heinonenreference the created device
14568f7a013SJaakko Heinonen.It MAKEDEV_NOWAIT
146f36575b5SJaakko Heinonendo not sleep, the call may fail
14768f7a013SJaakko Heinonen.It MAKEDEV_WAITOK
14868f7a013SJaakko Heinonenallow the function to sleep to satisfy malloc
14968f7a013SJaakko Heinonen.It MAKEDEV_ETERNAL
15068f7a013SJaakko Heinonencreated device will be never destroyed
15168f7a013SJaakko Heinonen.It MAKEDEV_CHECKNAME
152f36575b5SJaakko Heinonenreturn an error if the device name is invalid or already exists
15368f7a013SJaakko Heinonen.El
154fe754649SKonstantin Belousov.Pp
1558137364fSAndrey V. ElsukovOnly
1568137364fSAndrey V. Elsukov.Dv MAKEDEV_NOWAIT ,
1578137364fSAndrey V. Elsukov.Dv MAKEDEV_WAITOK
1588137364fSAndrey V. Elsukovand
1598137364fSAndrey V. Elsukov.Dv MAKEDEV_CHECKNAME
1608137364fSAndrey V. Elsukovvalues are accepted for the
1618137364fSAndrey V. Elsukov.Fn make_dev_alias_p
1628137364fSAndrey V. Elsukovfunction.
1638137364fSAndrey V. Elsukov.Pp
164fe754649SKonstantin BelousovThe
1652b848cb1SKonstantin Belousov.Dv MAKEDEV_WAITOK
1662b848cb1SKonstantin Belousovflag is assumed if none of
1672b848cb1SKonstantin Belousov.Dv MAKEDEV_WAITOK ,
1682b848cb1SKonstantin Belousov.Dv MAKEDEV_NOWAIT
1692b848cb1SKonstantin Belousovis specified.
1702b848cb1SKonstantin Belousov.Pp
1712b848cb1SKonstantin BelousovThe
172fe754649SKonstantin Belousov.Xr dev_clone 9
173fe754649SKonstantin Belousovevent handler shall specify
174fe754649SKonstantin Belousov.Dv MAKEDEV_REF
175fe754649SKonstantin Belousovflag when creating a device in response to lookup, to avoid race where
176fe754649SKonstantin Belousovthe device created is destroyed immediately after
177fe754649SKonstantin Belousov.Xr devfs_lookup 9
178fe754649SKonstantin Belousovdrops his reference to cdev.
179fe754649SKonstantin Belousov.Pp
180fe754649SKonstantin BelousovThe
1815e9cd1dbSKonstantin Belousov.Dv MAKEDEV_ETERNAL
1825e9cd1dbSKonstantin Belousovflag allows the kernel to not acquire some locks when translating system
1835e9cd1dbSKonstantin Belousovcalls into the cdevsw methods calls.
1845e9cd1dbSKonstantin BelousovIt is responsibility of the driver author to make sure that
1855e9cd1dbSKonstantin Belousov.Fn destroy_dev
1865e9cd1dbSKonstantin Belousovis never called on the returned cdev.
1875e9cd1dbSKonstantin BelousovFor the convenience, use the
1885e9cd1dbSKonstantin Belousov.Dv MAKEDEV_ETERNAL_KLD
1895e9cd1dbSKonstantin Belousovflag for the code that can be compiled into kernel or loaded
1905e9cd1dbSKonstantin Belousov(and unloaded) as loadable module.
1915e9cd1dbSKonstantin Belousov.Pp
19268f7a013SJaakko HeinonenA panic will occur if the MAKEDEV_CHECKNAME flag is not specified
19368f7a013SJaakko Heinonenand the device name is invalid or already exists.
19468f7a013SJaakko Heinonen.Pp
1955e9cd1dbSKonstantin BelousovThe
196fe754649SKonstantin Belousov.Fn make_dev_cred
197fe754649SKonstantin Belousovfunction is equivalent to the call
198fe754649SKonstantin Belousov.Bd -literal -offset indent
199edde8745SEd Schoutenmake_dev_credf(0, cdevsw, unit, cr, uid, gid, perms, fmt, ...);
200e10c1be4SUlrich Spörlein.Ed
201fe754649SKonstantin Belousov.Pp
202fe754649SKonstantin BelousovThe
203fe754649SKonstantin Belousov.Fn make_dev
204fe754649SKonstantin Belousovfunction call is the same as
205fe754649SKonstantin Belousov.Bd -literal -offset indent
206edde8745SEd Schoutenmake_dev_credf(0, cdevsw, unit, NULL, uid, gid, perms, fmt, ...);
207e10c1be4SUlrich Spörlein.Ed
208fe754649SKonstantin Belousov.Pp
209fe754649SKonstantin BelousovThe
210f36575b5SJaakko Heinonen.Fn make_dev_p
211f36575b5SJaakko Heinonenfunction is similar to
212f36575b5SJaakko Heinonen.Fn make_dev_credf
213f36575b5SJaakko Heinonenbut it may return an error number and takes a pointer to the resulting
214f36575b5SJaakko Heinonen.Ft *cdev
215f36575b5SJaakko Heinonenas an argument.
216f36575b5SJaakko Heinonen.Pp
217f36575b5SJaakko HeinonenThe
218792b2369SMatt Jacob.Fn make_dev_alias
219792b2369SMatt Jacobfunction takes the returned
220c97dc39fSChristian Brueffer.Ft cdev
221792b2369SMatt Jacobfrom
222792b2369SMatt Jacob.Fn make_dev
223edf0984dSRuslan Ermilovand makes another (aliased) name for this device.
224edf0984dSRuslan ErmilovIt is an error to call
225792b2369SMatt Jacob.Fn make_dev_alias
226792b2369SMatt Jacobprior to calling
227792b2369SMatt Jacob.Fn make_dev .
228792b2369SMatt Jacob.Pp
2298137364fSAndrey V. Elsukov.Fn make_dev_alias_p
2308137364fSAndrey V. Elsukovfunction is similar to
2318137364fSAndrey V. Elsukov.Fn make_dev_alias
2328137364fSAndrey V. Elsukovbut it takes a pointer to the resulting
2338137364fSAndrey V. Elsukov.Ft *cdev
2348137364fSAndrey V. Elsukovas an argument and may return an error.
2358137364fSAndrey V. Elsukov.Pp
236792b2369SMatt JacobThe
2372557913dSJohn-Mark Gurney.Fa cdev
2382557913dSJohn-Mark Gurneyreturned by
2392557913dSJohn-Mark Gurney.Fn make_dev
2402557913dSJohn-Mark Gurneyand
2412557913dSJohn-Mark Gurney.Fn make_dev_alias
2422557913dSJohn-Mark Gurneyhas two fields,
2432557913dSJohn-Mark Gurney.Fa si_drv1
2442557913dSJohn-Mark Gurneyand
2452557913dSJohn-Mark Gurney.Fa si_drv2 ,
24677213b87SChristian Bruefferthat are available to store state.
24777213b87SChristian BruefferBoth fields are of type
2482557913dSJohn-Mark Gurney.Ft void * .
2492557913dSJohn-Mark GurneyThese are designed to replace the
250edde8745SEd Schouten.Fa unit
2512557913dSJohn-Mark Gurneyargument to
25266c6ebfeSEd Schouten.Fn make_dev ,
25366c6ebfeSEd Schoutenwhich can be obtained with
25466c6ebfeSEd Schouten.Fn dev2unit .
2552557913dSJohn-Mark Gurney.Pp
2562557913dSJohn-Mark GurneyThe
257bd00dbfaSBruce Evans.Fn destroy_dev
25894b1839dSChris Costellofunction takes the returned
259c97dc39fSChristian Brueffer.Fa cdev
26094b1839dSChris Costellofrom
26194b1839dSChris Costello.Fn make_dev
262edf0984dSRuslan Ermilovand destroys the registration for that device.
263fe754649SKonstantin BelousovThe notification is sent to
264fe754649SKonstantin Belousov.Xr devctl 4
265fe754649SKonstantin Belousovabout the destruction event.
266edf0984dSRuslan ErmilovDo not call
267792b2369SMatt Jacob.Fn destroy_dev
268792b2369SMatt Jacobon devices that were created with
269792b2369SMatt Jacob.Fn make_dev_alias .
270f14b89faSDima Dorfman.Pp
271f14b89faSDima DorfmanThe
27244c63b64SDima Dorfman.Fn dev_depends
273f14b89faSDima Dorfmanfunction establishes a parent-child relationship between two devices.
274f14b89faSDima DorfmanThe net effect is that a
275f14b89faSDima Dorfman.Fn destroy_dev
276f14b89faSDima Dorfmanof the parent device will also result in the destruction of the
277f14b89faSDima Dorfmanchild device(s),
278f14b89faSDima Dorfmanif any exist.
279f14b89faSDima DorfmanA device may simultaneously be a parent and a child,
280b82af3f5SMike Pritchardso it is possible to build a complete hierarchy.
281fe754649SKonstantin Belousov.Pp
282fe754649SKonstantin BelousovThe
283fe754649SKonstantin Belousov.Fn destroy_dev_sched_cb
284fe754649SKonstantin Belousovfunction schedules execution of the
285fe754649SKonstantin Belousov.Fn destroy_dev
286fe754649SKonstantin Belousovfor the specified
287fe754649SKonstantin Belousov.Fa cdev
288fe754649SKonstantin Belousovin the safe context.
289fe754649SKonstantin BelousovAfter
290fe754649SKonstantin Belousov.Fn destroy_dev
291fe754649SKonstantin Belousovis finished, and if the supplied
292fe754649SKonstantin Belousov.Fa cb
29395adbc95SJaakko Heinonenis not
29495adbc95SJaakko Heinonen.Dv NULL ,
29595adbc95SJaakko Heinonenthe callback
296fe754649SKonstantin Belousov.Fa cb
297fe754649SKonstantin Belousovis called, with argument
298fe754649SKonstantin Belousov.Fa arg .
299fe754649SKonstantin BelousovThe
300fe754649SKonstantin Belousov.Fn destroy_dev_sched
301fe754649SKonstantin Belousovfunction is the same as
302fe754649SKonstantin Belousov.Bd -literal -offset indent
3033035649eSPawel Jakub Dawidekdestroy_dev_sched_cb(cdev, NULL, NULL);
304e10c1be4SUlrich Spörlein.Ed
305fe754649SKonstantin Belousov.Pp
306fe754649SKonstantin BelousovThe
307fe754649SKonstantin Belousov.Fn d_close
308fe754649SKonstantin Belousovdriver method cannot call
309fe754649SKonstantin Belousov.Fn destroy_dev
310*580a4587SAndrey V. Elsukovdirectly.
311*580a4587SAndrey V. ElsukovDoing so causes deadlock when
312fe754649SKonstantin Belousov.Fn destroy_dev
313fe754649SKonstantin Belousovwaits for all threads to leave the driver methods.
314fe754649SKonstantin BelousovAlso, because
315fe754649SKonstantin Belousov.Fn destroy_dev
316fe754649SKonstantin Belousovsleeps, no non-sleepable locks may be held over the call.
317fe754649SKonstantin BelousovThe
318fe754649SKonstantin Belousov.Fn destroy_dev_sched
319fe754649SKonstantin Belousovfamily of functions overcome these issues.
320fe754649SKonstantin Belousov.Pp
321fe754649SKonstantin BelousovThe device driver may call the
322fe754649SKonstantin Belousov.Fn destroy_dev_drain
323fe754649SKonstantin Belousovfunction to wait until all devices that have supplied
324fe754649SKonstantin Belousov.Fa csw
325*580a4587SAndrey V. Elsukovas cdevsw, are destroyed.
326*580a4587SAndrey V. ElsukovThis is useful when driver knows that
327fe754649SKonstantin Belousov.Fn destroy_dev_sched
328fe754649SKonstantin Belousovis called for all instantiated devices, but need to postpone module
329fe754649SKonstantin Belousovunload until
330fe754649SKonstantin Belousov.Fn destroy_dev
331fe754649SKonstantin Belousovis actually finished for all of them.
332f36575b5SJaakko Heinonen.Sh RETURN VALUES
333f36575b5SJaakko HeinonenIf successful,
334f36575b5SJaakko Heinonen.Fn make_dev_p
335f36575b5SJaakko Heinonenwill return 0, otherwise it will return an error.
336f36575b5SJaakko HeinonenIf successful,
337f36575b5SJaakko Heinonen.Fn make_dev_credf
338f36575b5SJaakko Heinonenwill return a valid
339f36575b5SJaakko Heinonen.Fa cdev
340f36575b5SJaakko Heinonenpointer, otherwise it will return
341f36575b5SJaakko Heinonen.Dv NULL .
342f36575b5SJaakko Heinonen.Sh ERRORS
343f36575b5SJaakko HeinonenThe
344f36575b5SJaakko Heinonen.Fn make_dev_p
3458137364fSAndrey V. Elsukovand
3468137364fSAndrey V. Elsukov.Fn make_dev_alias_p
347f36575b5SJaakko Heinonencall will fail and the device will be not registered if:
348f36575b5SJaakko Heinonen.Bl -tag -width Er
349f36575b5SJaakko Heinonen.It Bq Er ENOMEM
350f36575b5SJaakko HeinonenThe
351f36575b5SJaakko Heinonen.Dv MAKEDEV_NOWAIT
352353429bfSJaakko Heinonenflag was specified and a memory allocation request could not be satisfied.
353f36575b5SJaakko Heinonen.It Bq Er ENAMETOOLONG
354f36575b5SJaakko HeinonenThe
355f36575b5SJaakko Heinonen.Dv MAKEDEV_CHECKNAME
356353429bfSJaakko Heinonenflag was specified and the provided device name is longer than
357f36575b5SJaakko Heinonen.Dv SPECNAMELEN .
358f36575b5SJaakko Heinonen.It Bq Er EINVAL
359f36575b5SJaakko HeinonenThe
360f36575b5SJaakko Heinonen.Dv MAKEDEV_CHECKNAME
361353429bfSJaakko Heinonenflag was specified and the provided device name is empty, contains a
362f36575b5SJaakko Heinonen.Qq \&.
363f36575b5SJaakko Heinonenor
364f36575b5SJaakko Heinonen.Qq ..
365f36575b5SJaakko Heinonenpath component or ends with
366f36575b5SJaakko Heinonen.Ql / .
367f36575b5SJaakko Heinonen.It Bq Er EEXIST
368f36575b5SJaakko HeinonenThe
369f36575b5SJaakko Heinonen.Dv MAKEDEV_CHECKNAME
370353429bfSJaakko Heinonenflag was specified and the provided device name already exists.
371f36575b5SJaakko Heinonen.El
372fe754649SKonstantin Belousov.Pp
373e07f1d5fSHiten Pandya.Sh SEE ALSO
374fe754649SKonstantin Belousov.Xr devctl 4 ,
375*580a4587SAndrey V. Elsukov.Xr devfs 5 ,
376fe754649SKonstantin Belousov.Xr destroy_dev_drain 9 ,
377*580a4587SAndrey V. Elsukov.Xr dev_clone 9
37894b1839dSChris Costello.Sh HISTORY
37994b1839dSChris CostelloThe
38094b1839dSChris Costello.Fn make_dev
38194b1839dSChris Costelloand
382bd00dbfaSBruce Evans.Fn destroy_dev
38394b1839dSChris Costellofunctions first appeared in
38494b1839dSChris Costello.Fx 4.0 .
385792b2369SMatt JacobThe function
386792b2369SMatt Jacob.Fn make_dev_alias
387792b2369SMatt Jacobfirst appeared in
388792b2369SMatt Jacob.Fx 4.1 .
389f14b89faSDima DorfmanThe function
39044c63b64SDima Dorfman.Fn dev_depends
391f14b89faSDima Dorfmanfirst appeared in
392f14b89faSDima Dorfman.Fx 5.0 .
393fe754649SKonstantin BelousovThe functions
394fe754649SKonstantin Belousov.Fn make_dev_credf ,
395fe754649SKonstantin Belousov.Fn destroy_dev_sched ,
396fe754649SKonstantin Belousov.Fn destroy_dev_sched_cb
397fe754649SKonstantin Belousovfirst appeared in
398fe754649SKonstantin Belousov.Fx 7.0 .
399f36575b5SJaakko HeinonenThe function
400f36575b5SJaakko Heinonen.Fn make_dev_p
401f36575b5SJaakko Heinonenfirst appeared in
402f36575b5SJaakko Heinonen.Fx 8.2 .
403