summaryrefslogtreecommitdiff
path: root/Base/usr
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-11-17 19:48:11 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-11-17 19:48:11 +0100
commit3d558f47b04e80ffacc8bc7a91dadf5bcf0dd131 (patch)
tree987e671219c29952ffa21e235a7a3f7a3a7233e6 /Base/usr
parent3093b019d0c8ed64375c46e0ef91f37ee870dc45 (diff)
downloadserenity-3d558f47b04e80ffacc8bc7a91dadf5bcf0dd131.zip
Docs: Add uname(1) and uname(2) man pages
Diffstat (limited to 'Base/usr')
-rw-r--r--Base/usr/share/man/man1/uname.md31
-rw-r--r--Base/usr/share/man/man2/uname.md38
2 files changed, 69 insertions, 0 deletions
diff --git a/Base/usr/share/man/man1/uname.md b/Base/usr/share/man/man1/uname.md
new file mode 100644
index 0000000000..85bd7103e8
--- /dev/null
+++ b/Base/usr/share/man/man1/uname.md
@@ -0,0 +1,31 @@
+## Name
+
+uname - print kernel information
+
+## Synopsis
+
+`uname [-s] [-n] [-r] [-m] [-a]`
+
+## Description
+
+Print information about the operating system, as reported by the `uname()`
+system call.
+
+## Options
+
+* `-s`: Print the system name
+* `-n`: Print the node name (hostname)
+* `-r`: Print the system release version
+* `-m`: Print the machine type
+* `-a`: Print all of the above
+
+## Examples
+
+```sh
+$ uname -sm
+Serenity i686
+```
+
+## See also
+
+* [`uname`(2)](../man2/uname.md)
diff --git a/Base/usr/share/man/man2/uname.md b/Base/usr/share/man/man2/uname.md
new file mode 100644
index 0000000000..78bdc37199
--- /dev/null
+++ b/Base/usr/share/man/man2/uname.md
@@ -0,0 +1,38 @@
+## Name
+
+uname - retrieve information about the current kernel
+
+## Synopsis
+
+```**c++
+#include <sys/utsname.h>
+
+int uname(struct utsname* buf);
+```
+
+## Description
+
+Retrieves information about the current kernel and writes it into the `utsname`
+structure pointed to by `buf`.
+
+```**c++
+struct utsname {
+ char sysname[];
+ char nodename[];
+ char release[];
+ char version[];
+ char machine[];
+};
+```
+
+## Return value
+
+If successful, returns 0. Otherwise, returns -1 and sets `errno` to describe the error.
+
+## Errors
+
+* `EFAULT`: `buf` is not a writable address.
+
+## See also
+
+* [`uname`(1)](../man1/uname.md)