summaryrefslogtreecommitdiff
path: root/Base
diff options
context:
space:
mode:
authorBrendan Coles <bcoles@gmail.com>2021-03-03 23:18:39 +0000
committerAndreas Kling <kling@serenityos.org>2021-03-04 09:19:15 +0100
commit89265be167cf26b6a460afee2873c4c2084cfcf7 (patch)
tree18e99745561a5e442c604a9684bcfbe9368aafba /Base
parent45a11ead9aaaf5a0e7a169ef13c257b1e5ccc250 (diff)
downloadserenity-89265be167cf26b6a460afee2873c4c2084cfcf7.zip
Base: Add man pages for null/zero/full character devices
Diffstat (limited to 'Base')
-rw-r--r--Base/usr/share/man/man4/full.md35
-rw-r--r--Base/usr/share/man/man4/null.md19
-rw-r--r--Base/usr/share/man/man4/zero.md26
3 files changed, 80 insertions, 0 deletions
diff --git a/Base/usr/share/man/man4/full.md b/Base/usr/share/man/man4/full.md
new file mode 100644
index 0000000000..a47da13bd7
--- /dev/null
+++ b/Base/usr/share/man/man4/full.md
@@ -0,0 +1,35 @@
+## Name
+
+full - always full device
+
+## Description
+
+`/dev/full` is a character device which is always full.
+
+Reading from `/dev/full` returns '\0' bytes and exits with status 0.
+
+Writing to `/dev/full` fails with ENOSPC error.
+
+To create it manually:
+
+```sh
+mknod /dev/full c 1 7
+chmod 666 /dev/full
+```
+
+## Files
+
+* /dev/full
+
+## Examples
+
+```sh
+$ head -c 8 /dev/full | hexdump
+00 00 00 00 00 00 00 00
+```
+
+## See also
+
+* [`null`(4)](../man4/null.md)
+* [`zero`(4)](../man4/zero.md)
+
diff --git a/Base/usr/share/man/man4/null.md b/Base/usr/share/man/man4/null.md
new file mode 100644
index 0000000000..cb26d40453
--- /dev/null
+++ b/Base/usr/share/man/man4/null.md
@@ -0,0 +1,19 @@
+## Name
+
+null - data sink
+
+## Description
+
+`/dev/null` is a character device file which discards input.
+
+Reading from `/dev/null` returns end of file and exits with status 0.
+
+## Files
+
+* /dev/null
+
+## See also
+
+* [`full`(4)](../man4/full.md)
+* [`zero`(4)](../man4/zero.md)
+
diff --git a/Base/usr/share/man/man4/zero.md b/Base/usr/share/man/man4/zero.md
new file mode 100644
index 0000000000..2300b5a33b
--- /dev/null
+++ b/Base/usr/share/man/man4/zero.md
@@ -0,0 +1,26 @@
+## Name
+
+zero - data sink
+
+## Description
+
+`/dev/zero` is a character device file which discards input.
+
+Reading from `/dev/zero` returns '\0' bytes and exits with status 0.
+
+## Files
+
+* /dev/zero
+
+## Examples
+
+```sh
+$ head -c 8 /dev/zero | hexdump
+00 00 00 00 00 00 00 00
+```
+
+## See also
+
+* [`null`(4)](../man4/null.md)
+* [`full`(4)](../man4/full.md)
+