-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathinfo.h
More file actions
36 lines (32 loc) · 692 Bytes
/
Copy pathinfo.h
File metadata and controls
36 lines (32 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <syscall.h>
struct utsname {
char sysname[65];
char nodename[65];
char release[65];
char version[65];
char machine[65];
char domainname[65];
};
struct sysinfo {
unsigned long uptime;
unsigned long loads[3];
unsigned long totalram;
unsigned long freeram;
unsigned long sharedram;
unsigned long bufferram;
unsigned long totalswap;
unsigned long freeswap;
unsigned short procs, pad;
unsigned long totalhigh;
unsigned long freehigh;
unsigned mem_unit;
char __reserved[256];
};
inline static long sys_uname(struct utsname* buf)
{
return syscall1(NR_uname, (long)buf);
}
inline static long sys_info(struct sysinfo* buf)
{
return syscall1(NR_sysinfo, (long)buf);
}