File Index
Files and directories
Sign in
FILE

utsname.h

File preview with syntax highlighting.

linux-6.19.14/tools/include/nolibc/sys/utsname.h OBJECTIVE-C
 1/* SPDX-License-Identifier: LGPL-2.1 OR MIT */
 2/*
 3 * Utsname definitions for NOLIBC
 4 * Copyright (C) 2017-2021 Willy Tarreau <w@1wt.eu>
 5 */
 6
 7/* make sure to include all global symbols */
 8#include "../nolibc.h"
 9
10#ifndef _NOLIBC_SYS_UTSNAME_H
11#define _NOLIBC_SYS_UTSNAME_H
12
13#include "../sys.h"
14
15#include <linux/utsname.h>
16
17/*
18 * int uname(struct utsname *buf);
19 */
20
21struct utsname {
22	char sysname[65];
23	char nodename[65];
24	char release[65];
25	char version[65];
26	char machine[65];
27	char domainname[65];
28};
29
30static __attribute__((unused))
31int sys_uname(struct utsname *buf)
32{
33	return my_syscall1(__NR_uname, buf);
34}
35
36static __attribute__((unused))
37int uname(struct utsname *buf)
38{
39	return __sysret(sys_uname(buf));
40}
41
42#endif /* _NOLIBC_SYS_UTSNAME_H */
~/ Read-only file preview.