File Index
Files and directories
Sign in
FILE

utsname.h

File preview with syntax highlighting.

linux-6.19.14/include/linux/utsname.h C
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef _LINUX_UTSNAME_H
 3#define _LINUX_UTSNAME_H
 4
 5
 6#include <linux/sched.h>
 7#include <linux/nsproxy.h>
 8#include <linux/ns_common.h>
 9#include <linux/err.h>
10#include <linux/uts_namespace.h>
11
12enum uts_proc {
13	UTS_PROC_ARCH,
14	UTS_PROC_OSTYPE,
15	UTS_PROC_OSRELEASE,
16	UTS_PROC_VERSION,
17	UTS_PROC_HOSTNAME,
18	UTS_PROC_DOMAINNAME,
19};
20
21#ifdef CONFIG_PROC_SYSCTL
22extern void uts_proc_notify(enum uts_proc proc);
23#else
24static inline void uts_proc_notify(enum uts_proc proc)
25{
26}
27#endif
28
29static inline struct new_utsname *utsname(void)
30{
31	return &current->nsproxy->uts_ns->name;
32}
33
34static inline struct new_utsname *init_utsname(void)
35{
36	return &init_uts_ns.name;
37}
38
39extern struct rw_semaphore uts_sem;
40
41#endif /* _LINUX_UTSNAME_H */
~/ Read-only file preview.