1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00
shirou_gopsutil/disk/disk_freebsd_386.go
Tobias Klauser 6aae71ca26 Use Getstatfs from golang.org/x/sys/unix for 64-bit inode support on FreeBSD 12
Use unix.Getstatfs and its associated Statfs_t type instead of
implementing them locally in this package. This allows to use 64-bit
inode fields on FreeBSD 12 while still keeping backwards compatibility
for old FreeBSD versions, as unix.Getfsstat will use the correct syscall
number and data structure version and convert its result
correspondingly.

Also see https://golang.org/cl/136816 for details.
2020-01-03 13:18:44 +01:00

63 lines
1.1 KiB
Go

// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types_freebsd.go
package disk
const (
sizeofPtr = 0x4
sizeofShort = 0x2
sizeofInt = 0x4
sizeofLong = 0x4
sizeofLongLong = 0x8
sizeofLongDouble = 0x8
DEVSTAT_NO_DATA = 0x00
DEVSTAT_READ = 0x01
DEVSTAT_WRITE = 0x02
DEVSTAT_FREE = 0x03
)
const (
sizeOfDevstat = 0xf0
)
type (
_C_short int16
_C_int int32
_C_long int32
_C_long_long int64
_C_long_double int64
)
type Devstat struct {
Sequence0 uint32
Allocated int32
Start_count uint32
End_count uint32
Busy_from Bintime
Dev_links _Ctype_struct___0
Device_number uint32
Device_name [16]int8
Unit_number int32
Bytes [4]uint64
Operations [4]uint64
Duration [4]Bintime
Busy_time Bintime
Creation_time Bintime
Block_size uint32
Tag_types [3]uint64
Flags uint32
Device_type uint32
Priority uint32
Id *byte
Sequence1 uint32
}
type Bintime struct {
Sec int32
Frac uint64
}
type _Ctype_struct___0 struct {
Empty uint32
}