KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
utsname.h
Go to the documentation of this file.
1/* KallistiOS ##version##
2
3 sys/utsname.h
4 Copyright (C) 2018 Lawrence Sebald
5
6*/
7
8/** \file utsname.h
9 \brief Definitions for the uname() function.
10 \ingroup system_posix
11
12 This file contains the definitions needed for using the uname() function,
13 as directed by the POSIX 2008 standard (aka The Open Group Base
14 Specifications Issue 7).
15
16 \author Lawrence Sebald
17*/
18
19#ifndef __SYS_UTSNAME_H
20#define __SYS_UTSNAME_H
21
22#include <sys/cdefs.h>
23
24__BEGIN_DECLS
25
26/** \addtogroup system_posix
27 @{
28*/
29
30#define _UTSNAME_LENGTH 64
31
32/** \brief Kernel name/information structure.
33
34 This structure contains information about the kernel and is used by the
35 uname() function for returning that information to a program.
36
37 \headerfile sys/utsname.h
38 */
39struct utsname {
40 char sysname[_UTSNAME_LENGTH]; /**< \brief OS Name ("KallistiOS"). */
41 char nodename[_UTSNAME_LENGTH]; /**< \brief Name on network, if any. */
42 char release[_UTSNAME_LENGTH]; /**< \brief Kernel release ("2.1.0"). */
43 char version[_UTSNAME_LENGTH]; /**< \brief Kernel version string. */
44 char machine[_UTSNAME_LENGTH]; /**< \brief Hardware identifier. */
45};
46
47/** \brief Retrieve version and other similar information about the kernel.
48
49 This function retrieves information about the current version of the kernel
50 that is running, storing it in the provided buffer.
51
52 \param n The buffer to store version information in.
53 \return 0 on success, -1 on error (setting errno appropriately).
54*/
55int uname(struct utsname *n);
56
57/** @} */
58
59__END_DECLS
60
61#endif /* !__SYS_UTSNAME_H */
int uname(struct utsname *n)
Retrieve version and other similar information about the kernel.
#define _UTSNAME_LENGTH
Definition utsname.h:30
Kernel name/information structure.
Definition utsname.h:39
char nodename[_UTSNAME_LENGTH]
Name on network, if any.
Definition utsname.h:41
char sysname[_UTSNAME_LENGTH]
OS Name ("KallistiOS").
Definition utsname.h:40
char version[_UTSNAME_LENGTH]
Kernel version string.
Definition utsname.h:43
char release[_UTSNAME_LENGTH]
Kernel release ("2.1.0").
Definition utsname.h:42
char machine[_UTSNAME_LENGTH]
Hardware identifier.
Definition utsname.h:44