mirror of https://github.com/shirou/gopsutil
host_freebsd now use godefs
parent
4973aa73f9
commit
b0c9f81246
@ -1,17 +1,28 @@
|
|||||||
// +build freebsd
|
// +build freebsd
|
||||||
// +build amd64
|
// +build amd64
|
||||||
|
// Created by cgo -godefs - DO NOT EDIT
|
||||||
|
// cgo -godefs host/types_freebsd.go
|
||||||
|
|
||||||
package host
|
package host
|
||||||
|
|
||||||
const (
|
const (
|
||||||
UTNameSize = 16 /* see MAXLOGNAME in <sys/param.h> */
|
sizeofPtr = 0x8
|
||||||
UTLineSize = 8
|
sizeofShort = 0x2
|
||||||
UTHostSize = 16
|
sizeofInt = 0x4
|
||||||
|
sizeofLong = 0x8
|
||||||
|
sizeofLongLong = 0x8
|
||||||
)
|
)
|
||||||
|
|
||||||
type utmp struct {
|
type (
|
||||||
UtLine [UTLineSize]byte
|
_C_short int16
|
||||||
UtName [UTNameSize]byte
|
_C_int int32
|
||||||
UtHost [UTHostSize]byte
|
_C_long int64
|
||||||
UtTime int32
|
_C_long_long int64
|
||||||
|
)
|
||||||
|
|
||||||
|
type Utmp struct {
|
||||||
|
Line [8]int8
|
||||||
|
Name [16]int8
|
||||||
|
Host [16]int8
|
||||||
|
Time int32
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,40 @@
|
|||||||
|
// +build ignore
|
||||||
|
|
||||||
|
/*
|
||||||
|
Input to cgo -godefs.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package host
|
||||||
|
|
||||||
|
/*
|
||||||
|
#define KERNEL
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <utmp.h>
|
||||||
|
|
||||||
|
enum {
|
||||||
|
sizeofPtr = sizeof(void*),
|
||||||
|
};
|
||||||
|
|
||||||
|
*/
|
||||||
|
import "C"
|
||||||
|
|
||||||
|
// Machine characteristics; for internal use.
|
||||||
|
|
||||||
|
const (
|
||||||
|
sizeofPtr = C.sizeofPtr
|
||||||
|
sizeofShort = C.sizeof_short
|
||||||
|
sizeofInt = C.sizeof_int
|
||||||
|
sizeofLong = C.sizeof_long
|
||||||
|
sizeofLongLong = C.sizeof_longlong
|
||||||
|
)
|
||||||
|
|
||||||
|
// Basic types
|
||||||
|
|
||||||
|
type (
|
||||||
|
_C_short C.short
|
||||||
|
_C_int C.int
|
||||||
|
_C_long C.long
|
||||||
|
_C_long_long C.longlong
|
||||||
|
)
|
||||||
|
|
||||||
|
type Utmp C.struct_utmp
|
Loading…
Reference in New Issue