summaryrefslogtreecommitdiff
path: root/static/openbsd/man3/makedev.3
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 14:02:27 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 14:02:27 -0400
commit6d8bdc65446a704d0750217efd05532fc641ea7d (patch)
tree8ae6d698b3c9801750a8b117b3842fb369872a3a /static/openbsd/man3/makedev.3
parent2f467bd7ff8f8db0dafa40426166491d7f57f368 (diff)
docs: OpenBSD Man Pages Added
Diffstat (limited to 'static/openbsd/man3/makedev.3')
-rw-r--r--static/openbsd/man3/makedev.394
1 files changed, 94 insertions, 0 deletions
diff --git a/static/openbsd/man3/makedev.3 b/static/openbsd/man3/makedev.3
new file mode 100644
index 00000000..5083ec9b
--- /dev/null
+++ b/static/openbsd/man3/makedev.3
@@ -0,0 +1,94 @@
+.\" $OpenBSD: makedev.3,v 1.2 2019/01/25 00:19:26 millert Exp $
+.\"
+.\" Copyright (c) 2014 Todd C. Miller <millert@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: January 25 2019 $
+.Dt MAKEDEV 3
+.Os
+.Sh NAME
+.Nm makedev ,
+.Nm major ,
+.Nm minor
+.Nd create or extract device numbers
+.Sh SYNOPSIS
+.In sys/types.h
+.Ft dev_t
+.Fn makedev "unsigned int maj" "unsigned int min"
+.Ft unsigned int
+.Fn major "dev_t dev"
+.Ft unsigned int
+.Fn minor "dev_t dev"
+.Sh DESCRIPTION
+On
+.Ox ,
+all devices on the system are assigned a unique number which consists
+of a major and minor component.
+Typically, the major number identifies the kind of device and
+the minor number identifies a specific instance of the device.
+.Pp
+The
+.Fn makedev
+macro is used to combine a major and minor device number into
+a form suitable for use with the
+.Xr mknod 2
+system call.
+.Pp
+The
+.Fn major
+macro extracts the major number from the specified device number.
+.Pp
+The
+.Fn minor
+macro extracts the minor number from the specified device number.
+.Sh RETURN VALUES
+The
+.Fn makedev
+macro returns a combined device number from the specified major and
+minor numbers.
+.Pp
+The
+.Fn major
+macro returns the major number corresponding to the specified device number.
+.Pp
+The
+.Fn minor
+macro returns the minor number corresponding to the specified device number.
+.Sh SEE ALSO
+.Xr mknod 2 ,
+.Xr intro 4
+.Sh STANDARDS
+The
+.Fn makedev ,
+.Fn major ,
+and
+.Fn minor
+macros are not standardized by
+.St -p1003.1
+but are available on most systems.
+.Sh HISTORY
+The
+.Fn makedev ,
+.Fn major ,
+and
+.Fn minor
+macros first appeared in
+.At v7 .
+.Sh CAVEATS
+On some systems,
+.Fn makedev ,
+.Fn major ,
+and
+.Fn minor
+are implemented as functions rather than macros.