Fixed get_cpu_usage_perc(), continued working on storage functions
get_mountpoint_total_gb is still a working in progress, function causes segmentation fault, still working out whymaster
parent
9033c1bf09
commit
a14bacbb50
@ -0,0 +1,5 @@
|
|||||||
|
package sysinfo
|
||||||
|
|
||||||
|
foreign {
|
||||||
|
statvfs :: proc(path: cstring, stat: ^Sys_statvfs) ---
|
||||||
|
}
|
||||||
@ -1,7 +1,19 @@
|
|||||||
package sysinfo
|
package sysinfo
|
||||||
|
|
||||||
statfs :: struct {
|
import c "core:c/libc"
|
||||||
f_type: uint,
|
|
||||||
f_bsize: uint,
|
Sys_statvfs :: struct {
|
||||||
f_blocks: uint
|
f_bsize: c.ulong,
|
||||||
|
f_frsize: c.ulong,
|
||||||
|
f_blocks: c.ulong,
|
||||||
|
f_bfree: c.ulong,
|
||||||
|
f_bavail: c.ulong,
|
||||||
|
|
||||||
|
f_files: c.ulong,
|
||||||
|
f_ffree: c.ulong,
|
||||||
|
f_favail: c.ulong,
|
||||||
|
|
||||||
|
f_fsid: c.ulong,
|
||||||
|
f_flag: c.ulong,
|
||||||
|
f_namemax: c.ulong,
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue