• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * @defgroup utsname Utsname
3  * @ingroup libc
4  */
5 
6 #ifndef	_SYS_UTSNAME_H
7 #define	_SYS_UTSNAME_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 #include <features.h>
14 /**
15  * @ingroup utsname
16  * The defination of structure utsname.
17  */
18 struct utsname {
19 	char sysname[65];
20 	char nodename[65];
21 	char release[65];
22 	char version[65];
23 	char machine[65];
24 #ifdef _GNU_SOURCE
25 	char domainname[65];
26 #else
27 	char __domainname[65];
28 #endif
29 };
30 
31 /**
32  *@ingroup utsname
33  *
34  *@par Description:
35  *This API is used to get the name of current system.
36  *@attention
37  *<ul>
38  *<li> The members "machine" and "domainname" is not supported.</li>
39  *</ul>
40  *
41  *@retval  0    Get the name of current system successfully.
42  *@retval  -1   Fails to get the name of current system.
43  *
44  *@par Dependency:
45  *<ul><li>utsname.h</li></ul>
46  */
47 int uname (struct utsname *);
48 
49 #ifdef __cplusplus
50 }
51 #endif
52 
53 #endif
54