Page MenuHomeFreeBSD

D48516.1790360460.diff
No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None

D48516.1790360460.diff

diff --git a/share/man/man9/make_dev.9 b/share/man/man9/make_dev.9
--- a/share/man/man9/make_dev.9
+++ b/share/man/man9/make_dev.9
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 1999 Chris Costello
.\" All rights reserved.
.\"
@@ -22,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd March 2, 2016
+.Dd January 19, 2025
.Dt MAKE_DEV 9
.Os
.Sh NAME
@@ -105,6 +108,7 @@
void *mda_si_drv2;
};
.Ed
+.Pp
Before use and filling with the desired values, the structure must be
initialized by the
.Fn make_dev_args_init
@@ -166,10 +170,10 @@
The
.Va args.mda_flags
argument alters the operation of
-.Fn make_dev_s.
+.Fn make_dev_s .
The following values are currently accepted:
.Pp
-.Bl -tag -width "It Dv MAKEDEV_CHECKNAME" -compact -offset indent
+.Bl -tag -width "[MAKEDEV_CHECKNAME]" -compact -offset indent
.It Dv MAKEDEV_REF
reference the created device
.It Dv MAKEDEV_NOWAIT
@@ -226,13 +230,14 @@
.Pp
The
.Fn make_dev_p
-use of the form
+use of the form:
.Bd -literal -offset indent
struct cdev *dev;
int res;
res = make_dev_p(flags, &dev, cdevsw, cred, uid, gid, perms, name);
.Ed
-is equivalent to the code
+.Pp
+is equivalent to the code:
.Bd -literal -offset indent
struct cdev *dev;
struct make_dev_args args;
@@ -241,7 +246,7 @@
make_dev_args_init(&args);
args.mda_flags = flags;
args.mda_devsw = cdevsw;
-args.mda_cred = cred;
+args.mda_cr = cred;
args.mda_uid = uid;
args.mda_gid = gid;
args.mda_mode = perms;
@@ -250,10 +255,11 @@
.Pp
Similarly, the
.Fn make_dev_credf
-function call is equivalent to
+function call is equivalent to:
.Bd -literal -offset indent
- (void) make_dev_s(&args, &dev, name);
+(void) make_dev_s(&args, &dev, name);
.Ed
+.Pp
In other words,
.Fn make_dev_credf
does not allow the caller to obtain the return value, and in
@@ -263,14 +269,14 @@
.Pp
The
.Fn make_dev_cred
-function is equivalent to the call
+function is equivalent to the call:
.Bd -literal -offset indent
make_dev_credf(0, cdevsw, unit, cr, uid, gid, perms, fmt, ...);
.Ed
.Pp
The
.Fn make_dev
-function call is the same as
+function call is the same as:
.Bd -literal -offset indent
make_dev_credf(0, cdevsw, unit, NULL, uid, gid, perms, fmt, ...);
.Ed
@@ -377,7 +383,7 @@
.Fa arg .
The
.Fn destroy_dev_sched
-function is the same as
+function is the same as:
.Bd -literal -offset indent
destroy_dev_sched_cb(cdev, NULL, NULL);
.Ed

File Metadata

Mime Type
text/plain
Expires
Fri, Sep 25, 6:21 PM (8 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29927214
Default Alt Text
D48516.1790360460.diff (2 KB)

Event Timeline