Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
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#ifndef ZEPHYR_INCLUDE_POSIX_SYS_UTSNAME_H_
7#define ZEPHYR_INCLUDE_POSIX_SYS_UTSNAME_H_
8
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15/* These are for compatibility / practicality */
16#define _UTSNAME_NODENAME_LENGTH \
17 COND_CODE_1(CONFIG_POSIX_SINGLE_PROCESS, (CONFIG_POSIX_UNAME_VERSION_LEN), (0))
18#define _UTSNAME_VERSION_LENGTH \
19 COND_CODE_1(CONFIG_POSIX_SINGLE_PROCESS, (CONFIG_POSIX_UNAME_VERSION_LEN), (0))
20
21struct utsname {
22 char sysname[sizeof("Zephyr")];
23 char nodename[_UTSNAME_NODENAME_LENGTH + 1];
24 char release[sizeof("99.99.99-rc1")];
25 char version[_UTSNAME_VERSION_LENGTH + 1];
26 char machine[sizeof(CONFIG_ARCH)];
27};
28
29int uname(struct utsname *name);
30
31#ifdef __cplusplus
32}
33#endif
34
35#endif /* ZEPHYR_INCLUDE_POSIX_SYS_UTSNAME_H_ */
Definition: utsname.h:21
char machine[sizeof(CONFIG_ARCH)]
Definition: utsname.h:26
char sysname[sizeof("Zephyr")]
Definition: utsname.h:22
char version[COND_CODE_1(CONFIG_POSIX_SINGLE_PROCESS,(CONFIG_POSIX_UNAME_VERSION_LEN),(0))+1]
Definition: utsname.h:25
char nodename[COND_CODE_1(CONFIG_POSIX_SINGLE_PROCESS,(CONFIG_POSIX_UNAME_VERSION_LEN),(0))+1]
Definition: utsname.h:23
char release[sizeof("99.99.99-rc1")]
Definition: utsname.h:24
Macro utilities.
int uname(struct utsname *name)