diff options
author | cjihrig <cjihrig@gmail.com> | 2019-01-04 14:04:32 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2019-01-14 10:47:20 -0500 |
commit | d4288bbeab134277d20af672c0997ee23641d9aa (patch) | |
tree | e9fa25b63bc2cd3e7334577dd2b327ac3ee1fa1d /docs/src | |
parent | d39959c80d524620be8692979cbfd3ab3e294855 (diff) | |
download | libuv-d4288bbeab134277d20af672c0997ee23641d9aa.tar.gz libuv-d4288bbeab134277d20af672c0997ee23641d9aa.zip |
unix,win: add uv_os_uname()
Fixes: https://github.com/libuv/libuv/issues/2126
PR-URL: https://github.com/libuv/libuv/pull/2128
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/misc.rst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/src/misc.rst b/docs/src/misc.rst index cf4a7895..81c03a85 100644 --- a/docs/src/misc.rst +++ b/docs/src/misc.rst @@ -145,6 +145,19 @@ Data types char* homedir; } uv_passwd_t; +.. c:type:: uv_utsname_t + + Data type for operating system name and version information. + + :: + + typedef struct uv_utsname_s { + char sysname[256]; + char release[256]; + char version[256]; + char machine[256]; + } uv_utsname_t; + API --- @@ -549,3 +562,12 @@ API for others it will be silently reduced to `PRIORITY_HIGH`. .. versionadded:: 1.23.0 + +.. c:function:: int uv_os_uname(uv_utsname_t* buffer) + + Retrieves system information in `buffer`. The populated data includes the + operating system name, release, version, and machine. On non-Windows + systems, `uv_os_uname()` is a thin wrapper around :man:`uname(3)`. Returns + zero on success, and a non-zero error value otherwise. + + .. versionadded:: 1.25.0 |