posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
utsname.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Meta
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
17#ifndef ZEPHYR_INCLUDE_POSIX_SYS_UTSNAME_H_
18#define ZEPHYR_INCLUDE_POSIX_SYS_UTSNAME_H_
19
20#include <zephyr/sys/util_macro.h>
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
27#define _UTSNAME_NODENAME_LENGTH \
28 COND_CODE_1(CONFIG_POSIX_SINGLE_PROCESS, (CONFIG_POSIX_UNAME_VERSION_LEN), (0))
29#define _UTSNAME_VERSION_LENGTH \
30 COND_CODE_1(CONFIG_POSIX_SINGLE_PROCESS, (CONFIG_POSIX_UNAME_VERSION_LEN), (0))
34struct utsname {
35 char sysname[sizeof("Zephyr")];
36 char nodename[_UTSNAME_NODENAME_LENGTH + 1];
37 char release[sizeof("99.99.99-rc1")];
38 char version[_UTSNAME_VERSION_LENGTH + 1];
39 char machine[sizeof(CONFIG_ARCH)];
40};
41
49int uname(struct utsname *name);
50
51
52#ifdef __cplusplus
53}
54#endif
55
56#endif /* ZEPHYR_INCLUDE_POSIX_SYS_UTSNAME_H_ */
int uname(struct utsname *name)
Get the name of the current system.
System identification information returned by uname().
Definition utsname.h:34
char version[_UTSNAME_VERSION_LENGTH+1]
Current version level.
Definition utsname.h:38
char machine[sizeof(CONFIG_ARCH)]
Hardware type identifier.
Definition utsname.h:39
char sysname[sizeof("Zephyr")]
Name of the operating system.
Definition utsname.h:35
char nodename[_UTSNAME_NODENAME_LENGTH+1]
Network node hostname.
Definition utsname.h:36
char release[sizeof("99.99.99-rc1")]
Current release level.
Definition utsname.h:37