aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2026-07-27 14:14:51 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2026-07-27 16:12:13 +0000
commit4090d103b0c31b44b269e0ccf758be5cfba3f60c (patch)
tree06b8b3e42ed1e100da43e7347ae5ce68872ab3ff
parent3c6f63902b037e36648fae435d4d5f56f9dc389b (diff)
mknod.2: update the man page
State that FIFOs can be created, document the requirement that dev must be zero then. Mention whiteouts. PR: 297082 Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D58478
-rw-r--r--lib/libsys/mknod.223
1 files changed, 16 insertions, 7 deletions
diff --git a/lib/libsys/mknod.2 b/lib/libsys/mknod.2
index f4327262b46b..7dd4985e9cb9 100644
--- a/lib/libsys/mknod.2
+++ b/lib/libsys/mknod.2
@@ -53,13 +53,20 @@ indicates a block or character special file,
.Fa dev
is a configuration dependent specification denoting a particular device
on the system.
-Otherwise,
+Otherwise, if
+.Fa mode
+indicates the request to create a FIFO
+.Pq see Xr mkfifo 2
+the
+.Fa dev
+argument must be zero.
+For creating whiteouts, the
.Fa dev
-is ignored.
+argument is ignored.
.Pp
The
.Fn mknod
-system call
+system call, when called to create special files,
requires super-user privileges.
.Pp
The
@@ -132,10 +139,12 @@ The
argument
points outside the process's allocated address space.
.It Bq Er EINVAL
-Creating anything else than a block or character special
-file (or a
-.Em whiteout )
-is not supported.
+Creating anything other than a block or character special
+file, whiteout, or FIFO, is not supported.
+.It Bq Er EINVAL
+Non-zero
+.Fa dev
+specified when creating FIFO.
.El
.Pp
In addition to the errors returned by the