mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-28 04:46:44 -04:00
unix: update Darwin ztype files
The main effect is to change some fields of Statfs_t from arrays of int8 to arrays of byte. This makes the types of those fields correspond to the types used on most other BSD systems. Change-Id: If7e80fd53d6369a0f7c979c0bf36ffe530dc5d8d Reviewed-on: https://go-review.googlesource.com/c/sys/+/259903 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
@@ -92,9 +92,9 @@ type Statfs_t struct {
|
|||||||
Type uint32
|
Type uint32
|
||||||
Flags uint32
|
Flags uint32
|
||||||
Fssubtype uint32
|
Fssubtype uint32
|
||||||
Fstypename [16]int8
|
Fstypename [16]byte
|
||||||
Mntonname [1024]int8
|
Mntonname [1024]byte
|
||||||
Mntfromname [1024]int8
|
Mntfromname [1024]byte
|
||||||
Reserved [8]uint32
|
Reserved [8]uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -305,7 +305,6 @@ type IfMsghdr struct {
|
|||||||
Addrs int32
|
Addrs int32
|
||||||
Flags int32
|
Flags int32
|
||||||
Index uint16
|
Index uint16
|
||||||
_ [2]byte
|
|
||||||
Data IfData
|
Data IfData
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -348,7 +347,6 @@ type IfaMsghdr struct {
|
|||||||
Addrs int32
|
Addrs int32
|
||||||
Flags int32
|
Flags int32
|
||||||
Index uint16
|
Index uint16
|
||||||
_ [2]byte
|
|
||||||
Metric int32
|
Metric int32
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -369,7 +367,6 @@ type IfmaMsghdr2 struct {
|
|||||||
Addrs int32
|
Addrs int32
|
||||||
Flags int32
|
Flags int32
|
||||||
Index uint16
|
Index uint16
|
||||||
_ [2]byte
|
|
||||||
Refcount int32
|
Refcount int32
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -378,7 +375,6 @@ type RtMsghdr struct {
|
|||||||
Version uint8
|
Version uint8
|
||||||
Type uint8
|
Type uint8
|
||||||
Index uint16
|
Index uint16
|
||||||
_ [2]byte
|
|
||||||
Flags int32
|
Flags int32
|
||||||
Addrs int32
|
Addrs int32
|
||||||
Pid int32
|
Pid int32
|
||||||
@@ -400,7 +396,8 @@ type RtMetrics struct {
|
|||||||
Rtt uint32
|
Rtt uint32
|
||||||
Rttvar uint32
|
Rttvar uint32
|
||||||
Pksent uint32
|
Pksent uint32
|
||||||
Filler [4]uint32
|
State uint32
|
||||||
|
Filler [3]uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ type Stat_t struct {
|
|||||||
Uid uint32
|
Uid uint32
|
||||||
Gid uint32
|
Gid uint32
|
||||||
Rdev int32
|
Rdev int32
|
||||||
_ [4]byte
|
|
||||||
Atim Timespec
|
Atim Timespec
|
||||||
Mtim Timespec
|
Mtim Timespec
|
||||||
Ctim Timespec
|
Ctim Timespec
|
||||||
@@ -97,10 +96,11 @@ type Statfs_t struct {
|
|||||||
Type uint32
|
Type uint32
|
||||||
Flags uint32
|
Flags uint32
|
||||||
Fssubtype uint32
|
Fssubtype uint32
|
||||||
Fstypename [16]int8
|
Fstypename [16]byte
|
||||||
Mntonname [1024]int8
|
Mntonname [1024]byte
|
||||||
Mntfromname [1024]int8
|
Mntfromname [1024]byte
|
||||||
Reserved [8]uint32
|
Flags_ext uint32
|
||||||
|
Reserved [7]uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
type Flock_t struct {
|
type Flock_t struct {
|
||||||
@@ -133,8 +133,7 @@ type Fbootstraptransfer_t struct {
|
|||||||
|
|
||||||
type Log2phys_t struct {
|
type Log2phys_t struct {
|
||||||
Flags uint32
|
Flags uint32
|
||||||
_ [8]byte
|
_ [16]byte
|
||||||
_ [8]byte
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Fsid struct {
|
type Fsid struct {
|
||||||
@@ -225,10 +224,8 @@ type IPv6Mreq struct {
|
|||||||
type Msghdr struct {
|
type Msghdr struct {
|
||||||
Name *byte
|
Name *byte
|
||||||
Namelen uint32
|
Namelen uint32
|
||||||
_ [4]byte
|
|
||||||
Iov *Iovec
|
Iov *Iovec
|
||||||
Iovlen int32
|
Iovlen int32
|
||||||
_ [4]byte
|
|
||||||
Control *byte
|
Control *byte
|
||||||
Controllen uint32
|
Controllen uint32
|
||||||
Flags int32
|
Flags int32
|
||||||
@@ -313,7 +310,6 @@ type IfMsghdr struct {
|
|||||||
Addrs int32
|
Addrs int32
|
||||||
Flags int32
|
Flags int32
|
||||||
Index uint16
|
Index uint16
|
||||||
_ [2]byte
|
|
||||||
Data IfData
|
Data IfData
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -356,7 +352,6 @@ type IfaMsghdr struct {
|
|||||||
Addrs int32
|
Addrs int32
|
||||||
Flags int32
|
Flags int32
|
||||||
Index uint16
|
Index uint16
|
||||||
_ [2]byte
|
|
||||||
Metric int32
|
Metric int32
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,7 +372,6 @@ type IfmaMsghdr2 struct {
|
|||||||
Addrs int32
|
Addrs int32
|
||||||
Flags int32
|
Flags int32
|
||||||
Index uint16
|
Index uint16
|
||||||
_ [2]byte
|
|
||||||
Refcount int32
|
Refcount int32
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -386,7 +380,6 @@ type RtMsghdr struct {
|
|||||||
Version uint8
|
Version uint8
|
||||||
Type uint8
|
Type uint8
|
||||||
Index uint16
|
Index uint16
|
||||||
_ [2]byte
|
|
||||||
Flags int32
|
Flags int32
|
||||||
Addrs int32
|
Addrs int32
|
||||||
Pid int32
|
Pid int32
|
||||||
@@ -408,7 +401,8 @@ type RtMetrics struct {
|
|||||||
Rtt uint32
|
Rtt uint32
|
||||||
Rttvar uint32
|
Rttvar uint32
|
||||||
Pksent uint32
|
Pksent uint32
|
||||||
Filler [4]uint32
|
State uint32
|
||||||
|
Filler [3]uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -431,7 +425,6 @@ type BpfStat struct {
|
|||||||
|
|
||||||
type BpfProgram struct {
|
type BpfProgram struct {
|
||||||
Len uint32
|
Len uint32
|
||||||
_ [4]byte
|
|
||||||
Insns *BpfInsn
|
Insns *BpfInsn
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -456,7 +449,6 @@ type Termios struct {
|
|||||||
Cflag uint64
|
Cflag uint64
|
||||||
Lflag uint64
|
Lflag uint64
|
||||||
Cc [20]uint8
|
Cc [20]uint8
|
||||||
_ [4]byte
|
|
||||||
Ispeed uint64
|
Ispeed uint64
|
||||||
Ospeed uint64
|
Ospeed uint64
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// NOTE: cgo can't generate struct Stat_t and struct Statfs_t yet
|
// cgo -godefs types_darwin.go | go run mkpost.go
|
||||||
// Created by cgo -godefs - DO NOT EDIT
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
// cgo -godefs types_darwin.go
|
|
||||||
|
|
||||||
// +build arm,darwin
|
// +build arm,darwin
|
||||||
|
|
||||||
@@ -31,7 +30,7 @@ type Timeval struct {
|
|||||||
Usec int32
|
Usec int32
|
||||||
}
|
}
|
||||||
|
|
||||||
type Timeval32 [0]byte
|
type Timeval32 struct{}
|
||||||
|
|
||||||
type Rusage struct {
|
type Rusage struct {
|
||||||
Utime Timeval
|
Utime Timeval
|
||||||
@@ -93,9 +92,9 @@ type Statfs_t struct {
|
|||||||
Type uint32
|
Type uint32
|
||||||
Flags uint32
|
Flags uint32
|
||||||
Fssubtype uint32
|
Fssubtype uint32
|
||||||
Fstypename [16]int8
|
Fstypename [16]byte
|
||||||
Mntonname [1024]int8
|
Mntonname [1024]byte
|
||||||
Mntfromname [1024]int8
|
Mntfromname [1024]byte
|
||||||
Reserved [8]uint32
|
Reserved [8]uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -306,7 +305,6 @@ type IfMsghdr struct {
|
|||||||
Addrs int32
|
Addrs int32
|
||||||
Flags int32
|
Flags int32
|
||||||
Index uint16
|
Index uint16
|
||||||
_ [2]byte
|
|
||||||
Data IfData
|
Data IfData
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,7 +347,6 @@ type IfaMsghdr struct {
|
|||||||
Addrs int32
|
Addrs int32
|
||||||
Flags int32
|
Flags int32
|
||||||
Index uint16
|
Index uint16
|
||||||
_ [2]byte
|
|
||||||
Metric int32
|
Metric int32
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -370,7 +367,6 @@ type IfmaMsghdr2 struct {
|
|||||||
Addrs int32
|
Addrs int32
|
||||||
Flags int32
|
Flags int32
|
||||||
Index uint16
|
Index uint16
|
||||||
_ [2]byte
|
|
||||||
Refcount int32
|
Refcount int32
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -379,7 +375,6 @@ type RtMsghdr struct {
|
|||||||
Version uint8
|
Version uint8
|
||||||
Type uint8
|
Type uint8
|
||||||
Index uint16
|
Index uint16
|
||||||
_ [2]byte
|
|
||||||
Flags int32
|
Flags int32
|
||||||
Addrs int32
|
Addrs int32
|
||||||
Pid int32
|
Pid int32
|
||||||
@@ -401,7 +396,8 @@ type RtMetrics struct {
|
|||||||
Rtt uint32
|
Rtt uint32
|
||||||
Rttvar uint32
|
Rttvar uint32
|
||||||
Pksent uint32
|
Pksent uint32
|
||||||
Filler [4]uint32
|
State uint32
|
||||||
|
Filler [3]uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ type Stat_t struct {
|
|||||||
Uid uint32
|
Uid uint32
|
||||||
Gid uint32
|
Gid uint32
|
||||||
Rdev int32
|
Rdev int32
|
||||||
_ [4]byte
|
|
||||||
Atim Timespec
|
Atim Timespec
|
||||||
Mtim Timespec
|
Mtim Timespec
|
||||||
Ctim Timespec
|
Ctim Timespec
|
||||||
@@ -97,10 +96,11 @@ type Statfs_t struct {
|
|||||||
Type uint32
|
Type uint32
|
||||||
Flags uint32
|
Flags uint32
|
||||||
Fssubtype uint32
|
Fssubtype uint32
|
||||||
Fstypename [16]int8
|
Fstypename [16]byte
|
||||||
Mntonname [1024]int8
|
Mntonname [1024]byte
|
||||||
Mntfromname [1024]int8
|
Mntfromname [1024]byte
|
||||||
Reserved [8]uint32
|
Flags_ext uint32
|
||||||
|
Reserved [7]uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
type Flock_t struct {
|
type Flock_t struct {
|
||||||
@@ -133,8 +133,7 @@ type Fbootstraptransfer_t struct {
|
|||||||
|
|
||||||
type Log2phys_t struct {
|
type Log2phys_t struct {
|
||||||
Flags uint32
|
Flags uint32
|
||||||
_ [8]byte
|
_ [16]byte
|
||||||
_ [8]byte
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Fsid struct {
|
type Fsid struct {
|
||||||
@@ -225,10 +224,8 @@ type IPv6Mreq struct {
|
|||||||
type Msghdr struct {
|
type Msghdr struct {
|
||||||
Name *byte
|
Name *byte
|
||||||
Namelen uint32
|
Namelen uint32
|
||||||
_ [4]byte
|
|
||||||
Iov *Iovec
|
Iov *Iovec
|
||||||
Iovlen int32
|
Iovlen int32
|
||||||
_ [4]byte
|
|
||||||
Control *byte
|
Control *byte
|
||||||
Controllen uint32
|
Controllen uint32
|
||||||
Flags int32
|
Flags int32
|
||||||
@@ -313,7 +310,6 @@ type IfMsghdr struct {
|
|||||||
Addrs int32
|
Addrs int32
|
||||||
Flags int32
|
Flags int32
|
||||||
Index uint16
|
Index uint16
|
||||||
_ [2]byte
|
|
||||||
Data IfData
|
Data IfData
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -356,7 +352,6 @@ type IfaMsghdr struct {
|
|||||||
Addrs int32
|
Addrs int32
|
||||||
Flags int32
|
Flags int32
|
||||||
Index uint16
|
Index uint16
|
||||||
_ [2]byte
|
|
||||||
Metric int32
|
Metric int32
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,7 +372,6 @@ type IfmaMsghdr2 struct {
|
|||||||
Addrs int32
|
Addrs int32
|
||||||
Flags int32
|
Flags int32
|
||||||
Index uint16
|
Index uint16
|
||||||
_ [2]byte
|
|
||||||
Refcount int32
|
Refcount int32
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -386,7 +380,6 @@ type RtMsghdr struct {
|
|||||||
Version uint8
|
Version uint8
|
||||||
Type uint8
|
Type uint8
|
||||||
Index uint16
|
Index uint16
|
||||||
_ [2]byte
|
|
||||||
Flags int32
|
Flags int32
|
||||||
Addrs int32
|
Addrs int32
|
||||||
Pid int32
|
Pid int32
|
||||||
@@ -408,7 +401,8 @@ type RtMetrics struct {
|
|||||||
Rtt uint32
|
Rtt uint32
|
||||||
Rttvar uint32
|
Rttvar uint32
|
||||||
Pksent uint32
|
Pksent uint32
|
||||||
Filler [4]uint32
|
State uint32
|
||||||
|
Filler [3]uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -431,7 +425,6 @@ type BpfStat struct {
|
|||||||
|
|
||||||
type BpfProgram struct {
|
type BpfProgram struct {
|
||||||
Len uint32
|
Len uint32
|
||||||
_ [4]byte
|
|
||||||
Insns *BpfInsn
|
Insns *BpfInsn
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -456,7 +449,6 @@ type Termios struct {
|
|||||||
Cflag uint64
|
Cflag uint64
|
||||||
Lflag uint64
|
Lflag uint64
|
||||||
Cc [20]uint8
|
Cc [20]uint8
|
||||||
_ [4]byte
|
|
||||||
Ispeed uint64
|
Ispeed uint64
|
||||||
Ospeed uint64
|
Ospeed uint64
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user