1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Document make_dev_alias_p().

MFC after:	2 weeks
This commit is contained in:
Andrey V. Elsukov 2011-05-03 18:55:16 +00:00
parent b50a7799b8
commit 8137364f6e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=221398

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd October 24, 2010
.Dd May 03, 2011
.Dt MAKE_DEV 9
.Os
.Sh NAME
@ -33,6 +33,7 @@
.Nm make_dev_credf ,
.Nm make_dev_p ,
.Nm make_dev_alias ,
.Nm make_dev_alias_p ,
.Nm destroy_dev ,
.Nm destroy_dev_sched ,
.Nm destroy_dev_sched_cb ,
@ -54,6 +55,8 @@ and DEVFS registration for devices
.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" ...
.Ft struct cdev *
.Fn make_dev_alias "struct cdev *pdev" "const char *fmt" ...
.Ft int
.Fn make_dev_alias_p "int flags" "struct cdev **cdev" "struct cdev *pdev" "const char *fmt" ...
.Ft void
.Fn destroy_dev "struct cdev *dev"
.Ft void
@ -149,6 +152,15 @@ created device will be never destroyed
return an error if the device name is invalid or already exists
.El
.Pp
Only
.Dv MAKEDEV_NOWAIT ,
.Dv MAKEDEV_WAITOK
and
.Dv MAKEDEV_CHECKNAME
values are accepted for the
.Fn make_dev_alias_p
function.
.Pp
The
.Dv MAKEDEV_WAITOK
flag is assumed if none of
@ -214,6 +226,13 @@ It is an error to call
prior to calling
.Fn make_dev .
.Pp
.Fn make_dev_alias_p
function is similar to
.Fn make_dev_alias
but it takes a pointer to the resulting
.Ft *cdev
as an argument and may return an error.
.Pp
The
.Fa cdev
returned by
@ -321,6 +340,8 @@ pointer, otherwise it will return
.Sh ERRORS
The
.Fn make_dev_p
and
.Fn make_dev_alias_p
call will fail and the device will be not registered if:
.Bl -tag -width Er
.It Bq Er ENOMEM