fix progress bar

This commit is contained in:
Zack Scholl 2018-04-22 06:49:27 -06:00
parent b6df5839b8
commit 95bec30262
53 changed files with 5427 additions and 260 deletions

27
Gopkg.lock generated
View File

@ -5,7 +5,7 @@
branch = "master"
name = "github.com/dustin/go-humanize"
packages = ["."]
revision = "bb3d318650d48840a39aa21a027c6630e198e626"
revision = "02af3965c54e8cacf948b97fef38925c4120652c"
[[projects]]
name = "github.com/fatih/structs"
@ -46,8 +46,8 @@
[[projects]]
name = "github.com/schollz/progressbar"
packages = ["."]
revision = "5fb8484b7c7c686d5dbe5b7031fe2f1f464444a9"
version = "v0.5.0"
revision = "5441d79e9e64d6356575e1e296142ebba27949a7"
version = "v0.6.0"
[[projects]]
name = "github.com/schollz/tarinator-go"
@ -76,20 +76,31 @@
[[projects]]
branch = "master"
name = "github.com/yudai/hcl"
packages = [".","hcl","json"]
packages = [
".",
"hcl",
"json"
]
revision = "5fa2393b3552119bf33a69adb1402a1160cba23d"
[[projects]]
branch = "master"
name = "golang.org/x/crypto"
packages = ["pbkdf2","scrypt","ssh/terminal"]
revision = "d6449816ce06963d9d136eee5a56fca5b0616e7e"
packages = [
"pbkdf2",
"scrypt",
"ssh/terminal"
]
revision = "e73bf333ef8920dbb52ad18d4bd38ad9d9bc76d7"
[[projects]]
branch = "master"
name = "golang.org/x/sys"
packages = ["unix","windows"]
revision = "f6f352972f061230a99fbf49d1eb8073ebdb36cb"
packages = [
"unix",
"windows"
]
revision = "79b0c6888797020a994db17c8510466c72fe75d9"
[[projects]]
name = "golang.org/x/text"

View File

@ -253,7 +253,7 @@ func (c *Connection) Run() error {
}
if c.Local {
fmt.Fprintf(os.Stderr, "Receive with: croc --code 8-local --server %s\n", GetLocalIP())
fmt.Fprintf(os.Stderr, "Receive with: croc --code 8-local --server %s --yes\n", GetLocalIP())
} else {
fmt.Fprintf(os.Stderr, "Code is: %s\n", c.Code)
}
@ -459,9 +459,12 @@ func (c *Connection) runClient() error {
responses.Lock()
responses.startTime = time.Now()
responses.Unlock()
if !c.Debug {
if !c.Debug && id == 0 {
c.bar.SetMax(c.File.Size)
c.bar.Reset()
} else {
// try to let the first thread start first
time.Sleep(10 * time.Millisecond)
}
if err := c.receiveFile(id, connection); err != nil {
log.Error(errors.Wrap(err, "Problem receiving the file: "))

View File

@ -22,8 +22,8 @@ type AppConfig struct {
DontEncrypt bool `yaml:"no-encrypt" flagName:"no-encrypt" flagSName:"g" flagDescribe:"Turn off encryption" default:"false"`
UseStdout bool `yaml:"stdout" flagName:"stdout" flagSName:"o" flagDescribe:"Use stdout" default:"false"`
Yes bool `yaml:"yes" flagName:"yes" flagSName:"y" flagDescribe:"Automatically accept file" default:"false"`
Local bool `yaml:"local" flagName:"local" flagSName:"lo" flagDescribe:"Automatically accept file" default:"false"`
Server string `yaml:"server" flagName:"server" flagSName:"l" flagDescribe:"start relay when sending" default:"false"`
Local bool `yaml:"local" flagName:"local" flagSName:"lo" flagDescribe:"Use local relay when sending" default:"false"`
Server string `yaml:"server" flagName:"server" flagSName:"l" flagDescribe:"Croc relay to use" default:"cowyo.com"`
File string `yaml:"send" flagName:"send" flagSName:"s" flagDescribe:"File to send default:""`
Path string `yaml:"save" flagName:"save" flagSName:"p" flagDescribe:"Path to save to" default:""`
Code string `yaml:"code" flagName:"code" flagSName:"c" flagDescribe:"Use your own code phrase" default:""`

View File

@ -76,6 +76,14 @@ func Commaf(v float64) string {
return buf.String()
}
// CommafWithDigits works like the Commaf but limits the resulting
// string to the given number of decimal places.
//
// e.g. CommafWithDigits(834142.32, 1) -> 834,142.3
func CommafWithDigits(f float64, decimals int) string {
return stripTrailingDigits(Commaf(f), decimals)
}
// BigComma produces a string form of the given big.Int in base 10
// with commas after every three orders of magnitude.
func BigComma(b *big.Int) string {

View File

@ -36,6 +36,15 @@ func TestCommas(t *testing.T) {
}.validate(t)
}
func TestCommafWithDigits(t *testing.T) {
testList{
{"1.23, 0", CommafWithDigits(1.23, 0), "1"},
{"1.23, 1", CommafWithDigits(1.23, 1), "1.2"},
{"1.23, 2", CommafWithDigits(1.23, 2), "1.23"},
{"1.23, 3", CommafWithDigits(1.23, 3), "1.23"},
}.validate(t)
}
func TestCommafs(t *testing.T) {
testList{
{"0", Commaf(0), "0"},

View File

@ -1,6 +1,9 @@
package humanize
import "strconv"
import (
"strconv"
"strings"
)
func stripTrailingZeros(s string) string {
offset := len(s) - 1
@ -17,7 +20,27 @@ func stripTrailingZeros(s string) string {
return s[:offset+1]
}
func stripTrailingDigits(s string, digits int) string {
if i := strings.Index(s, "."); i >= 0 {
if digits <= 0 {
return s[:i]
}
i++
if i+digits >= len(s) {
return s
}
return s[:i+digits]
}
return s
}
// Ftoa converts a float to a string with no trailing zeros.
func Ftoa(num float64) string {
return stripTrailingZeros(strconv.FormatFloat(num, 'f', 6, 64))
}
// FtoaWithDigits converts a float to a string but limits the resulting string
// to the given number of decimal places, and no trailing zeros.
func FtoaWithDigits(num float64, digits int) string {
return stripTrailingZeros(stripTrailingDigits(strconv.FormatFloat(num, 'f', 6, 64), digits))
}

View File

@ -2,9 +2,13 @@ package humanize
import (
"fmt"
"math/rand"
"reflect"
"regexp"
"strconv"
"strings"
"testing"
"testing/quick"
)
func TestFtoa(t *testing.T) {
@ -17,6 +21,70 @@ func TestFtoa(t *testing.T) {
}.validate(t)
}
func TestFtoaWithDigits(t *testing.T) {
testList{
{"1.23, 0", FtoaWithDigits(1.23, 0), "1"},
{"1.23, 1", FtoaWithDigits(1.23, 1), "1.2"},
{"1.23, 2", FtoaWithDigits(1.23, 2), "1.23"},
{"1.23, 3", FtoaWithDigits(1.23, 3), "1.23"},
}.validate(t)
}
func TestStripTrailingDigits(t *testing.T) {
err := quick.Check(func(s string, digits int) bool {
stripped := stripTrailingDigits(s, digits)
// A stripped string will always be a prefix of its original string
if !strings.HasPrefix(s, stripped) {
return false
}
if strings.ContainsRune(s, '.') {
// If there is a dot, the part on the left of the dot will never change
a := strings.Split(s, ".")
b := strings.Split(stripped, ".")
if a[0] != b[0] {
return false
}
} else {
// If there's no dot in the input, the output will always be the same as the input.
if stripped != s {
return false
}
}
return true
}, &quick.Config{
MaxCount: 10000,
Values: func(v []reflect.Value, r *rand.Rand) {
rdigs := func(n int) string {
digs := []rune{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}
var rv []rune
for i := 0; i < n; i++ {
rv = append(rv, digs[r.Intn(len(digs))])
}
return string(rv)
}
ls := r.Intn(20)
rs := r.Intn(20)
jc := "."
if rs == 0 {
jc = ""
}
s := rdigs(ls) + jc + rdigs(rs)
digits := r.Intn(len(s) + 1)
v[0] = reflect.ValueOf(s)
v[1] = reflect.ValueOf(digits)
},
})
if err != nil {
t.Error(err)
}
}
func BenchmarkFtoaRegexTrailing(b *testing.B) {
trailingZerosRegex := regexp.MustCompile(`\.?0+$`)

View File

@ -93,6 +93,16 @@ func SI(input float64, unit string) string {
return Ftoa(value) + " " + prefix + unit
}
// SIWithDigits works like SI but limits the resulting string to the
// given number of decimal places.
//
// e.g. SIWithDigits(1000000, 0, "B") -> 1 MB
// e.g. SIWithDigits(2.2345e-12, 2, "F") -> 2.23 pF
func SIWithDigits(input float64, decimals int, unit string) string {
value, prefix := ComputeSI(input)
return FtoaWithDigits(value, decimals) + " " + prefix + unit
}
var errInvalid = errors.New("invalid input")
// ParseSI parses an SI string back into the number and unit.

View File

@ -94,6 +94,29 @@ func TestSI(t *testing.T) {
}
}
func TestSIWithDigits(t *testing.T) {
tests := []struct {
name string
num float64
digits int
formatted string
}{
{"e-12", 2.234e-12, 0, "2 pF"},
{"e-12", 2.234e-12, 1, "2.2 pF"},
{"e-12", 2.234e-12, 2, "2.23 pF"},
{"e-12", 2.234e-12, 3, "2.234 pF"},
{"e-12", 2.234e-12, 4, "2.234 pF"},
}
for _, test := range tests {
got := SIWithDigits(test.num, test.digits, "F")
if got != test.formatted {
t.Errorf("On %v (%v), got %v, wanted %v",
test.name, test.num, got, test.formatted)
}
}
}
func BenchmarkParseSI(b *testing.B) {
for i := 0; i < b.N; i++ {
ParseSI("2.2346ZB")

View File

@ -31,8 +31,8 @@ type ProgressBar struct {
func (p *ProgressBar) SetTheme(theme []string) {
p.Lock()
defer p.Unlock()
p.theme = theme
p.Unlock()
}
// New returns a new ProgressBar
@ -81,64 +81,40 @@ func (p *ProgressBar) SetWriter(w io.Writer) {
// Add with increase the current count on the progress bar
func (p *ProgressBar) Add(num int) error {
p.RLock()
currentNum := p.currentNum
p.RUnlock()
return p.Set(currentNum + num)
}
// Set will change the current count on the progress bar
func (p *ProgressBar) Set(num int) error {
p.Lock()
defer p.Unlock()
if p.max == 0 {
p.Unlock()
return errors.New("max must be greater than 0")
}
p.currentNum = num
p.currentNum += num
percent := float64(p.currentNum) / float64(p.max)
p.currentSaucerSize = int(percent * float64(p.size))
p.currentPercent = int(percent * 100)
updateBar := p.currentPercent != p.lastPercent && p.currentPercent > 0
p.lastPercent = p.currentPercent
p.Unlock()
if updateBar {
return p.Show()
}
return nil
}
// Show will print the current progress bar
func (p *ProgressBar) Show() error {
p.RLock()
defer p.RUnlock()
if p.currentNum > p.max {
return errors.New("current number exceeds max")
}
s := p.String()
if updateBar {
leftTime := time.Since(p.startTime).Seconds() / float64(p.currentNum) * (float64(p.max) - float64(p.currentNum))
s := fmt.Sprintf("\r%4d%% %s%s%s%s [%s:%s] ",
p.currentPercent,
p.theme[2],
strings.Repeat(p.theme[0], p.currentSaucerSize),
strings.Repeat(p.theme[1], p.size-p.currentSaucerSize),
p.theme[3],
(time.Duration(time.Since(p.startTime).Seconds()) * time.Second).String(),
(time.Duration(leftTime) * time.Second).String(),
)
_, err := io.WriteString(p.w, s)
if err != nil {
return err
}
_, err := io.WriteString(p.w, s)
if err != nil {
return err
}
if f, ok := p.w.(*os.File); ok {
f.Sync()
if f, ok := p.w.(*os.File); ok {
f.Sync()
}
}
return nil
}
func (p *ProgressBar) String() string {
p.RLock()
defer p.RUnlock()
leftTime := time.Since(p.startTime).Seconds() / float64(p.currentNum) * (float64(p.max) - float64(p.currentNum))
return fmt.Sprintf("\r%4d%% %s%s%s%s [%s:%s] ",
p.currentPercent,
p.theme[2],
strings.Repeat(p.theme[0], p.currentSaucerSize),
strings.Repeat(p.theme[1], p.size-p.currentSaucerSize),
p.theme[3],
(time.Duration(time.Since(p.startTime).Seconds()) * time.Second).String(),
(time.Duration(leftTime) * time.Second).String(),
)
}

View File

@ -23,6 +23,12 @@ func (b *Builder) AddASN1Int64(v int64) {
b.addASN1Signed(asn1.INTEGER, v)
}
// AddASN1Int64WithTag appends a DER-encoded ASN.1 INTEGER with the
// given tag.
func (b *Builder) AddASN1Int64WithTag(v int64, tag asn1.Tag) {
b.addASN1Signed(tag, v)
}
// AddASN1Enum appends a DER-encoded ASN.1 ENUMERATION.
func (b *Builder) AddASN1Enum(v int64) {
b.addASN1Signed(asn1.ENUM, v)
@ -362,6 +368,14 @@ func asn1Unsigned(out *uint64, n []byte) bool {
return true
}
// ReadASN1Int64WithTag decodes an ASN.1 INTEGER with the given tag into out
// and advances. It reports whether the read was successful and resulted in a
// value that can be represented in an int64.
func (s *String) ReadASN1Int64WithTag(out *int64, tag asn1.Tag) bool {
var bytes String
return s.ReadASN1(&bytes, tag) && checkASN1Integer(bytes) && asn1Signed(out, bytes)
}
// ReadASN1Enum decodes an ASN.1 ENUMERATION into out and advances. It reports
// whether the read was successful.
func (s *String) ReadASN1Enum(out *int) bool {
@ -623,7 +637,7 @@ func (s *String) ReadOptionalASN1Integer(out interface{}, tag asn1.Tag, defaultV
// ReadOptionalASN1OctetString attempts to read an optional ASN.1 OCTET STRING
// explicitly tagged with tag into out and advances. If no element with a
// matching tag is present, it writes defaultValue into out instead. It reports
// matching tag is present, it sets "out" to nil instead. It reports
// whether the read was successful.
func (s *String) ReadOptionalASN1OctetString(out *[]byte, outPresent *bool, tag asn1.Tag) bool {
var present bool

View File

@ -149,6 +149,39 @@ func TestReadASN1IntegerSigned(t *testing.T) {
}
}
})
// Repeat with the implicit-tagging functions
t.Run("WithTag", func(t *testing.T) {
for i, test := range testData64 {
tag := asn1.Tag((i * 3) % 32).ContextSpecific()
testData := make([]byte, len(test.in))
copy(testData, test.in)
// Alter the tag of the test case.
testData[0] = uint8(tag)
in := String(testData)
var out int64
ok := in.ReadASN1Int64WithTag(&out, tag)
if !ok || out != test.out {
t.Errorf("#%d: in.ReadASN1Int64WithTag() = %v, want true; out = %d, want %d", i, ok, out, test.out)
}
var b Builder
b.AddASN1Int64WithTag(test.out, tag)
result, err := b.Bytes()
if err != nil {
t.Errorf("#%d: AddASN1Int64WithTag failed: %s", i, err)
continue
}
if !bytes.Equal(result, testData) {
t.Errorf("#%d: AddASN1Int64WithTag: got %x, want %x", i, result, testData)
}
}
})
}
func TestReadASN1IntegerUnsigned(t *testing.T) {

View File

@ -67,6 +67,8 @@ package unix
#include <linux/taskstats.h>
#include <linux/cgroupstats.h>
#include <linux/genetlink.h>
#include <linux/socket.h>
#include <linux/hdreg.h>
// abi/abi.h generated by mkall.go.
#include "abi/abi.h"
@ -76,7 +78,7 @@ package unix
// Use the stat defined by the kernel with a few modifications. These are:
// * The time fields (like st_atime and st_atimensec) use the timespec
// struct (like st_atim) for consitancy with the glibc fields.
// struct (like st_atim) for consistency with the glibc fields.
// * The padding fields get different names to not break compatibility.
// * st_blocks is signed, again for compatibility.
struct stat {
@ -96,8 +98,8 @@ struct stat {
off_t st_size;
// These are declared as speperate fields in the kernel. Here we use
// the timespec struct for consistancy with the other stat structs.
// These are declared as separate fields in the kernel. Here we use
// the timespec struct for consistency with the other stat structs.
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
@ -231,6 +233,61 @@ struct my_epoll_event {
int32_t pad;
};
// Copied from <linux/perf_event.h> with the following modifications:
// 1) bit field after read_format redeclared as '__u64 bits' to make it
// accessible from Go
// 2) collapsed the unions, to avoid confusing godoc for the generated output
// (e.g. having to use BpAddr as an extension of Config)
struct perf_event_attr_go {
__u32 type;
__u32 size;
__u64 config;
// union {
// __u64 sample_period;
// __u64 sample_freq;
// };
__u64 sample;
__u64 sample_type;
__u64 read_format;
// Replaces the bit field. Flags are defined as constants.
__u64 bits;
// union {
// __u32 wakeup_events;
// __u32 wakeup_watermark;
// };
__u32 wakeup;
__u32 bp_type;
// union {
// __u64 bp_addr;
// __u64 config1;
// };
__u64 ext1;
// union {
// __u64 bp_len;
// __u64 config2;
// };
__u64 ext2;
__u64 branch_sample_type;
__u64 sample_regs_user;
__u32 sample_stack_user;
__s32 clockid;
__u64 sample_regs_intr;
__u32 aux_watermark;
__u32 __reserved_2;
};
*/
import "C"
@ -698,6 +755,138 @@ const (
BDADDR_LE_RANDOM = C.BDADDR_LE_RANDOM
)
// Perf subsystem
type PerfEventAttr C.struct_perf_event_attr_go
type PerfEventMmapPage C.struct_perf_event_mmap_page
// Bit field in struct perf_event_attr expanded as flags.
// Set these on PerfEventAttr.Bits by ORing them together.
const (
PerfBitDisabled uint64 = CBitFieldMaskBit0
PerfBitInherit = CBitFieldMaskBit1
PerfBitPinned = CBitFieldMaskBit2
PerfBitExclusive = CBitFieldMaskBit3
PerfBitExcludeUser = CBitFieldMaskBit4
PerfBitExcludeKernel = CBitFieldMaskBit5
PerfBitExcludeHv = CBitFieldMaskBit6
PerfBitExcludeIdle = CBitFieldMaskBit7
PerfBitMmap = CBitFieldMaskBit8
PerfBitComm = CBitFieldMaskBit9
PerfBitFreq = CBitFieldMaskBit10
PerfBitInheritStat = CBitFieldMaskBit11
PerfBitEnableOnExec = CBitFieldMaskBit12
PerfBitTask = CBitFieldMaskBit13
PerfBitWatermark = CBitFieldMaskBit14
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
PerfBitMmapData = CBitFieldMaskBit17
PerfBitSampleIDAll = CBitFieldMaskBit18
PerfBitExcludeHost = CBitFieldMaskBit19
PerfBitExcludeGuest = CBitFieldMaskBit20
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
PerfBitMmap2 = CBitFieldMaskBit23
PerfBitCommExec = CBitFieldMaskBit24
PerfBitUseClockID = CBitFieldMaskBit25
PerfBitContextSwitch = CBitFieldMaskBit26
)
const (
PERF_TYPE_HARDWARE = C.PERF_TYPE_HARDWARE
PERF_TYPE_SOFTWARE = C.PERF_TYPE_SOFTWARE
PERF_TYPE_TRACEPOINT = C.PERF_TYPE_TRACEPOINT
PERF_TYPE_HW_CACHE = C.PERF_TYPE_HW_CACHE
PERF_TYPE_RAW = C.PERF_TYPE_RAW
PERF_TYPE_BREAKPOINT = C.PERF_TYPE_BREAKPOINT
PERF_COUNT_HW_CPU_CYCLES = C.PERF_COUNT_HW_CPU_CYCLES
PERF_COUNT_HW_INSTRUCTIONS = C.PERF_COUNT_HW_INSTRUCTIONS
PERF_COUNT_HW_CACHE_REFERENCES = C.PERF_COUNT_HW_CACHE_REFERENCES
PERF_COUNT_HW_CACHE_MISSES = C.PERF_COUNT_HW_CACHE_MISSES
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = C.PERF_COUNT_HW_BRANCH_INSTRUCTIONS
PERF_COUNT_HW_BRANCH_MISSES = C.PERF_COUNT_HW_BRANCH_MISSES
PERF_COUNT_HW_BUS_CYCLES = C.PERF_COUNT_HW_BUS_CYCLES
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = C.PERF_COUNT_HW_STALLED_CYCLES_FRONTEND
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = C.PERF_COUNT_HW_STALLED_CYCLES_BACKEND
PERF_COUNT_HW_REF_CPU_CYCLES = C.PERF_COUNT_HW_REF_CPU_CYCLES
PERF_COUNT_HW_CACHE_L1D = C.PERF_COUNT_HW_CACHE_L1D
PERF_COUNT_HW_CACHE_L1I = C.PERF_COUNT_HW_CACHE_L1I
PERF_COUNT_HW_CACHE_LL = C.PERF_COUNT_HW_CACHE_LL
PERF_COUNT_HW_CACHE_DTLB = C.PERF_COUNT_HW_CACHE_DTLB
PERF_COUNT_HW_CACHE_ITLB = C.PERF_COUNT_HW_CACHE_ITLB
PERF_COUNT_HW_CACHE_BPU = C.PERF_COUNT_HW_CACHE_BPU
PERF_COUNT_HW_CACHE_NODE = C.PERF_COUNT_HW_CACHE_NODE
PERF_COUNT_HW_CACHE_OP_READ = C.PERF_COUNT_HW_CACHE_OP_READ
PERF_COUNT_HW_CACHE_OP_WRITE = C.PERF_COUNT_HW_CACHE_OP_WRITE
PERF_COUNT_HW_CACHE_OP_PREFETCH = C.PERF_COUNT_HW_CACHE_OP_PREFETCH
PERF_COUNT_HW_CACHE_RESULT_ACCESS = C.PERF_COUNT_HW_CACHE_RESULT_ACCESS
PERF_COUNT_HW_CACHE_RESULT_MISS = C.PERF_COUNT_HW_CACHE_RESULT_MISS
PERF_COUNT_SW_CPU_CLOCK = C.PERF_COUNT_SW_CPU_CLOCK
PERF_COUNT_SW_TASK_CLOCK = C.PERF_COUNT_SW_TASK_CLOCK
PERF_COUNT_SW_PAGE_FAULTS = C.PERF_COUNT_SW_PAGE_FAULTS
PERF_COUNT_SW_CONTEXT_SWITCHES = C.PERF_COUNT_SW_CONTEXT_SWITCHES
PERF_COUNT_SW_CPU_MIGRATIONS = C.PERF_COUNT_SW_CPU_MIGRATIONS
PERF_COUNT_SW_PAGE_FAULTS_MIN = C.PERF_COUNT_SW_PAGE_FAULTS_MIN
PERF_COUNT_SW_PAGE_FAULTS_MAJ = C.PERF_COUNT_SW_PAGE_FAULTS_MAJ
PERF_COUNT_SW_ALIGNMENT_FAULTS = C.PERF_COUNT_SW_ALIGNMENT_FAULTS
PERF_COUNT_SW_EMULATION_FAULTS = C.PERF_COUNT_SW_EMULATION_FAULTS
PERF_COUNT_SW_DUMMY = C.PERF_COUNT_SW_DUMMY
PERF_SAMPLE_IP = C.PERF_SAMPLE_IP
PERF_SAMPLE_TID = C.PERF_SAMPLE_TID
PERF_SAMPLE_TIME = C.PERF_SAMPLE_TIME
PERF_SAMPLE_ADDR = C.PERF_SAMPLE_ADDR
PERF_SAMPLE_READ = C.PERF_SAMPLE_READ
PERF_SAMPLE_CALLCHAIN = C.PERF_SAMPLE_CALLCHAIN
PERF_SAMPLE_ID = C.PERF_SAMPLE_ID
PERF_SAMPLE_CPU = C.PERF_SAMPLE_CPU
PERF_SAMPLE_PERIOD = C.PERF_SAMPLE_PERIOD
PERF_SAMPLE_STREAM_ID = C.PERF_SAMPLE_STREAM_ID
PERF_SAMPLE_RAW = C.PERF_SAMPLE_RAW
PERF_SAMPLE_BRANCH_STACK = C.PERF_SAMPLE_BRANCH_STACK
PERF_SAMPLE_BRANCH_USER = C.PERF_SAMPLE_BRANCH_USER
PERF_SAMPLE_BRANCH_KERNEL = C.PERF_SAMPLE_BRANCH_KERNEL
PERF_SAMPLE_BRANCH_HV = C.PERF_SAMPLE_BRANCH_HV
PERF_SAMPLE_BRANCH_ANY = C.PERF_SAMPLE_BRANCH_ANY
PERF_SAMPLE_BRANCH_ANY_CALL = C.PERF_SAMPLE_BRANCH_ANY_CALL
PERF_SAMPLE_BRANCH_ANY_RETURN = C.PERF_SAMPLE_BRANCH_ANY_RETURN
PERF_SAMPLE_BRANCH_IND_CALL = C.PERF_SAMPLE_BRANCH_IND_CALL
PERF_FORMAT_TOTAL_TIME_ENABLED = C.PERF_FORMAT_TOTAL_TIME_ENABLED
PERF_FORMAT_TOTAL_TIME_RUNNING = C.PERF_FORMAT_TOTAL_TIME_RUNNING
PERF_FORMAT_ID = C.PERF_FORMAT_ID
PERF_FORMAT_GROUP = C.PERF_FORMAT_GROUP
PERF_RECORD_MMAP = C.PERF_RECORD_MMAP
PERF_RECORD_LOST = C.PERF_RECORD_LOST
PERF_RECORD_COMM = C.PERF_RECORD_COMM
PERF_RECORD_EXIT = C.PERF_RECORD_EXIT
PERF_RECORD_THROTTLE = C.PERF_RECORD_THROTTLE
PERF_RECORD_UNTHROTTLE = C.PERF_RECORD_UNTHROTTLE
PERF_RECORD_FORK = C.PERF_RECORD_FORK
PERF_RECORD_READ = C.PERF_RECORD_READ
PERF_RECORD_SAMPLE = C.PERF_RECORD_SAMPLE
PERF_CONTEXT_HV = C.PERF_CONTEXT_HV
PERF_CONTEXT_KERNEL = C.PERF_CONTEXT_KERNEL
PERF_CONTEXT_USER = C.PERF_CONTEXT_USER
PERF_CONTEXT_GUEST = C.PERF_CONTEXT_GUEST
PERF_CONTEXT_GUEST_KERNEL = C.PERF_CONTEXT_GUEST_KERNEL
PERF_CONTEXT_GUEST_USER = C.PERF_CONTEXT_GUEST_USER
PERF_FLAG_FD_NO_GROUP = C.PERF_FLAG_FD_NO_GROUP
PERF_FLAG_FD_OUTPUT = C.PERF_FLAG_FD_OUTPUT
PERF_FLAG_PID_CGROUP = C.PERF_FLAG_PID_CGROUP
)
// Platform ABI and calling convention
// Bit field masks for interoperability with C code that uses bit fields.
@ -769,3 +958,17 @@ const (
CBitFieldMaskBit62 = C.BITFIELD_MASK_62
CBitFieldMaskBit63 = C.BITFIELD_MASK_63
)
// TCP-MD5 signature.
type SockaddrStorage C.struct_sockaddr_storage
type TCPMD5Sig C.struct_tcp_md5sig
// Disk drive operations.
type HDDriveCmdHdr C.struct_hd_drive_cmd_hdr
type HDGeometry C.struct_hd_geometry
type HDDriveID C.struct_hd_driveid

View File

@ -189,6 +189,7 @@ struct ltchars {
#include <linux/genetlink.h>
#include <linux/stat.h>
#include <linux/watchdog.h>
#include <linux/hdreg.h>
#include <net/route.h>
#include <asm/termbits.h>
@ -436,6 +437,7 @@ ccflags="$@"
$2 ~ /^ATTR_(BIT_MAP_COUNT|(CMN|VOL|FILE)_)/ ||
$2 ~ /^FSOPT_/ ||
$2 ~ /^WDIOC_/ ||
$2 ~ /^(HDIO|WIN|SMART)_/ ||
$2 !~ "WMESGLEN" &&
$2 ~ /^W[A-Z0-9]+$/ ||
$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}

View File

@ -42,6 +42,10 @@ func main() {
log.Fatal(err)
}
// Intentionally export __val fields in Fsid and Sigset_t
valRegex := regexp.MustCompile(`type (Fsid|Sigset_t) struct {(\s+)X__val(\s+\S+\s+)}`)
b = valRegex.ReplaceAll(b, []byte("type $1 struct {${2}Val$3}"))
// If we have empty Ptrace structs, we should delete them. Only s390x emits
// nonempty Ptrace structs.
ptraceRexexp := regexp.MustCompile(`type Ptrace((Psw|Fpregs|Per) struct {\s*})`)
@ -69,12 +73,9 @@ func main() {
removePaddingFieldsRegex := regexp.MustCompile(`Pad_cgo_\d+`)
b = removePaddingFieldsRegex.ReplaceAll(b, []byte("_"))
// We refuse to export private fields on s390x
if goarch == "s390x" && goos == "linux" {
// Remove padding, hidden, or unused fields
removeFieldsRegex = regexp.MustCompile(`\bX_\S+`)
b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
}
// Remove padding, hidden, or unused fields
removeFieldsRegex = regexp.MustCompile(`\bX_\S+`)
b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
// Remove the first line of warning from cgo
b = b[bytes.IndexByte(b, '\n')+1:]

View File

@ -944,15 +944,17 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
}
var dummy byte
if len(oob) > 0 {
var sockType int
sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
if err != nil {
return
}
// receive at least one normal byte
if sockType != SOCK_DGRAM && len(p) == 0 {
iov.Base = &dummy
iov.SetLen(1)
if len(p) == 0 {
var sockType int
sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
if err != nil {
return
}
// receive at least one normal byte
if sockType != SOCK_DGRAM {
iov.Base = &dummy
iov.SetLen(1)
}
}
msg.Control = &oob[0]
msg.SetControllen(len(oob))
@ -996,15 +998,17 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
}
var dummy byte
if len(oob) > 0 {
var sockType int
sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
if err != nil {
return 0, err
}
// send at least one normal byte
if sockType != SOCK_DGRAM && len(p) == 0 {
iov.Base = &dummy
iov.SetLen(1)
if len(p) == 0 {
var sockType int
sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
if err != nil {
return 0, err
}
// send at least one normal byte
if sockType != SOCK_DGRAM {
iov.Base = &dummy
iov.SetLen(1)
}
}
msg.Control = &oob[0]
msg.SetControllen(len(oob))
@ -1260,6 +1264,7 @@ func Getpgrp() (pid int) {
//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
//sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
//sysnb prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)

View File

@ -222,6 +222,7 @@ func Uname(uname *Utsname) error {
//sysnb Getppid() (ppid int)
//sys Getpriority(which int, who int) (prio int, err error)
//sysnb Getrlimit(which int, lim *Rlimit) (err error)
//sysnb Getrtable() (rtable int, err error)
//sysnb Getrusage(who int, rusage *Rusage) (err error)
//sysnb Getsid(pid int) (sid int, err error)
//sysnb Gettimeofday(tv *Timeval) (err error)
@ -259,6 +260,7 @@ func Uname(uname *Utsname) error {
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(which int, lim *Rlimit) (err error)
//sysnb Setrtable(rtable int) (err error)
//sysnb Setsid() (pid int, err error)
//sysnb Settimeofday(tp *Timeval) (err error)
//sysnb Setuid(uid int) (err error)
@ -307,7 +309,6 @@ func Uname(uname *Utsname) error {
// getlogin
// getresgid
// getresuid
// getrtable
// getthrid
// ktrace
// lfs_bmapv
@ -343,7 +344,6 @@ func Uname(uname *Utsname) error {
// semop
// setgroups
// setitimer
// setrtable
// setsockopt
// shmat
// shmctl

View File

@ -446,6 +446,7 @@ const (
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
EXABYTE_ENABLE_NEST = 0xf0
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
@ -543,6 +544,46 @@ const (
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HDIO_DRIVE_CMD = 0x31f
HDIO_DRIVE_CMD_AEB = 0x31e
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
HDIO_DRIVE_RESET = 0x31c
HDIO_DRIVE_TASK = 0x31e
HDIO_DRIVE_TASKFILE = 0x31d
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
HDIO_GETGEO = 0x301
HDIO_GET_32BIT = 0x309
HDIO_GET_ACOUSTIC = 0x30f
HDIO_GET_ADDRESS = 0x310
HDIO_GET_BUSSTATE = 0x31a
HDIO_GET_DMA = 0x30b
HDIO_GET_IDENTITY = 0x30d
HDIO_GET_KEEPSETTINGS = 0x308
HDIO_GET_MULTCOUNT = 0x304
HDIO_GET_NICE = 0x30c
HDIO_GET_NOWERR = 0x30a
HDIO_GET_QDMA = 0x305
HDIO_GET_UNMASKINTR = 0x302
HDIO_GET_WCACHE = 0x30e
HDIO_OBSOLETE_IDENTITY = 0x307
HDIO_SCAN_HWIF = 0x328
HDIO_SET_32BIT = 0x324
HDIO_SET_ACOUSTIC = 0x32c
HDIO_SET_ADDRESS = 0x32f
HDIO_SET_BUSSTATE = 0x32d
HDIO_SET_DMA = 0x326
HDIO_SET_KEEPSETTINGS = 0x323
HDIO_SET_MULTCOUNT = 0x321
HDIO_SET_NICE = 0x329
HDIO_SET_NOWERR = 0x325
HDIO_SET_PIO_MODE = 0x327
HDIO_SET_QDMA = 0x32e
HDIO_SET_UNMASKINTR = 0x322
HDIO_SET_WCACHE = 0x32b
HDIO_SET_XFER = 0x306
HDIO_TRISTATE_HWIF = 0x31b
HDIO_UNREGISTER_HWIF = 0x32a
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
@ -1560,6 +1601,20 @@ const (
SIOCSPGRP = 0x8902
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SMART_AUTOSAVE = 0xd2
SMART_AUTO_OFFLINE = 0xdb
SMART_DISABLE = 0xd9
SMART_ENABLE = 0xd8
SMART_HCYL_PASS = 0xc2
SMART_IMMEDIATE_OFFLINE = 0xd4
SMART_LCYL_PASS = 0x4f
SMART_READ_LOG_SECTOR = 0xd5
SMART_READ_THRESHOLDS = 0xd1
SMART_READ_VALUES = 0xd0
SMART_SAVE = 0xd3
SMART_STATUS = 0xda
SMART_WRITE_LOG_SECTOR = 0xd6
SMART_WRITE_THRESHOLDS = 0xd7
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x2
@ -1944,6 +1999,86 @@ const (
WDIOC_SETPRETIMEOUT = 0xc0045708
WDIOC_SETTIMEOUT = 0xc0045706
WEXITED = 0x4
WIN_ACKMEDIACHANGE = 0xdb
WIN_CHECKPOWERMODE1 = 0xe5
WIN_CHECKPOWERMODE2 = 0x98
WIN_DEVICE_RESET = 0x8
WIN_DIAGNOSE = 0x90
WIN_DOORLOCK = 0xde
WIN_DOORUNLOCK = 0xdf
WIN_DOWNLOAD_MICROCODE = 0x92
WIN_FLUSH_CACHE = 0xe7
WIN_FLUSH_CACHE_EXT = 0xea
WIN_FORMAT = 0x50
WIN_GETMEDIASTATUS = 0xda
WIN_IDENTIFY = 0xec
WIN_IDENTIFY_DMA = 0xee
WIN_IDLEIMMEDIATE = 0xe1
WIN_INIT = 0x60
WIN_MEDIAEJECT = 0xed
WIN_MULTREAD = 0xc4
WIN_MULTREAD_EXT = 0x29
WIN_MULTWRITE = 0xc5
WIN_MULTWRITE_EXT = 0x39
WIN_NOP = 0x0
WIN_PACKETCMD = 0xa0
WIN_PIDENTIFY = 0xa1
WIN_POSTBOOT = 0xdc
WIN_PREBOOT = 0xdd
WIN_QUEUED_SERVICE = 0xa2
WIN_READ = 0x20
WIN_READDMA = 0xc8
WIN_READDMA_EXT = 0x25
WIN_READDMA_ONCE = 0xc9
WIN_READDMA_QUEUED = 0xc7
WIN_READDMA_QUEUED_EXT = 0x26
WIN_READ_BUFFER = 0xe4
WIN_READ_EXT = 0x24
WIN_READ_LONG = 0x22
WIN_READ_LONG_ONCE = 0x23
WIN_READ_NATIVE_MAX = 0xf8
WIN_READ_NATIVE_MAX_EXT = 0x27
WIN_READ_ONCE = 0x21
WIN_RECAL = 0x10
WIN_RESTORE = 0x10
WIN_SECURITY_DISABLE = 0xf6
WIN_SECURITY_ERASE_PREPARE = 0xf3
WIN_SECURITY_ERASE_UNIT = 0xf4
WIN_SECURITY_FREEZE_LOCK = 0xf5
WIN_SECURITY_SET_PASS = 0xf1
WIN_SECURITY_UNLOCK = 0xf2
WIN_SEEK = 0x70
WIN_SETFEATURES = 0xef
WIN_SETIDLE1 = 0xe3
WIN_SETIDLE2 = 0x97
WIN_SETMULT = 0xc6
WIN_SET_MAX = 0xf9
WIN_SET_MAX_EXT = 0x37
WIN_SLEEPNOW1 = 0xe6
WIN_SLEEPNOW2 = 0x99
WIN_SMART = 0xb0
WIN_SPECIFY = 0x91
WIN_SRST = 0x8
WIN_STANDBY = 0xe2
WIN_STANDBY2 = 0x96
WIN_STANDBYNOW1 = 0xe0
WIN_STANDBYNOW2 = 0x94
WIN_VERIFY = 0x40
WIN_VERIFY_EXT = 0x42
WIN_VERIFY_ONCE = 0x41
WIN_WRITE = 0x30
WIN_WRITEDMA = 0xca
WIN_WRITEDMA_EXT = 0x35
WIN_WRITEDMA_ONCE = 0xcb
WIN_WRITEDMA_QUEUED = 0xcc
WIN_WRITEDMA_QUEUED_EXT = 0x36
WIN_WRITE_BUFFER = 0xe8
WIN_WRITE_EXT = 0x34
WIN_WRITE_LONG = 0x32
WIN_WRITE_LONG_ONCE = 0x33
WIN_WRITE_ONCE = 0x31
WIN_WRITE_SAME = 0xe9
WIN_WRITE_VERIFY = 0x3c
WNOHANG = 0x1
WNOTHREAD = 0x20000000
WNOWAIT = 0x1000000

View File

@ -446,6 +446,7 @@ const (
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
EXABYTE_ENABLE_NEST = 0xf0
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
@ -543,6 +544,46 @@ const (
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HDIO_DRIVE_CMD = 0x31f
HDIO_DRIVE_CMD_AEB = 0x31e
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
HDIO_DRIVE_RESET = 0x31c
HDIO_DRIVE_TASK = 0x31e
HDIO_DRIVE_TASKFILE = 0x31d
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
HDIO_GETGEO = 0x301
HDIO_GET_32BIT = 0x309
HDIO_GET_ACOUSTIC = 0x30f
HDIO_GET_ADDRESS = 0x310
HDIO_GET_BUSSTATE = 0x31a
HDIO_GET_DMA = 0x30b
HDIO_GET_IDENTITY = 0x30d
HDIO_GET_KEEPSETTINGS = 0x308
HDIO_GET_MULTCOUNT = 0x304
HDIO_GET_NICE = 0x30c
HDIO_GET_NOWERR = 0x30a
HDIO_GET_QDMA = 0x305
HDIO_GET_UNMASKINTR = 0x302
HDIO_GET_WCACHE = 0x30e
HDIO_OBSOLETE_IDENTITY = 0x307
HDIO_SCAN_HWIF = 0x328
HDIO_SET_32BIT = 0x324
HDIO_SET_ACOUSTIC = 0x32c
HDIO_SET_ADDRESS = 0x32f
HDIO_SET_BUSSTATE = 0x32d
HDIO_SET_DMA = 0x326
HDIO_SET_KEEPSETTINGS = 0x323
HDIO_SET_MULTCOUNT = 0x321
HDIO_SET_NICE = 0x329
HDIO_SET_NOWERR = 0x325
HDIO_SET_PIO_MODE = 0x327
HDIO_SET_QDMA = 0x32e
HDIO_SET_UNMASKINTR = 0x322
HDIO_SET_WCACHE = 0x32b
HDIO_SET_XFER = 0x306
HDIO_TRISTATE_HWIF = 0x31b
HDIO_UNREGISTER_HWIF = 0x32a
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
@ -1561,6 +1602,20 @@ const (
SIOCSPGRP = 0x8902
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SMART_AUTOSAVE = 0xd2
SMART_AUTO_OFFLINE = 0xdb
SMART_DISABLE = 0xd9
SMART_ENABLE = 0xd8
SMART_HCYL_PASS = 0xc2
SMART_IMMEDIATE_OFFLINE = 0xd4
SMART_LCYL_PASS = 0x4f
SMART_READ_LOG_SECTOR = 0xd5
SMART_READ_THRESHOLDS = 0xd1
SMART_READ_VALUES = 0xd0
SMART_SAVE = 0xd3
SMART_STATUS = 0xda
SMART_WRITE_LOG_SECTOR = 0xd6
SMART_WRITE_THRESHOLDS = 0xd7
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x2
@ -1945,6 +2000,86 @@ const (
WDIOC_SETPRETIMEOUT = 0xc0045708
WDIOC_SETTIMEOUT = 0xc0045706
WEXITED = 0x4
WIN_ACKMEDIACHANGE = 0xdb
WIN_CHECKPOWERMODE1 = 0xe5
WIN_CHECKPOWERMODE2 = 0x98
WIN_DEVICE_RESET = 0x8
WIN_DIAGNOSE = 0x90
WIN_DOORLOCK = 0xde
WIN_DOORUNLOCK = 0xdf
WIN_DOWNLOAD_MICROCODE = 0x92
WIN_FLUSH_CACHE = 0xe7
WIN_FLUSH_CACHE_EXT = 0xea
WIN_FORMAT = 0x50
WIN_GETMEDIASTATUS = 0xda
WIN_IDENTIFY = 0xec
WIN_IDENTIFY_DMA = 0xee
WIN_IDLEIMMEDIATE = 0xe1
WIN_INIT = 0x60
WIN_MEDIAEJECT = 0xed
WIN_MULTREAD = 0xc4
WIN_MULTREAD_EXT = 0x29
WIN_MULTWRITE = 0xc5
WIN_MULTWRITE_EXT = 0x39
WIN_NOP = 0x0
WIN_PACKETCMD = 0xa0
WIN_PIDENTIFY = 0xa1
WIN_POSTBOOT = 0xdc
WIN_PREBOOT = 0xdd
WIN_QUEUED_SERVICE = 0xa2
WIN_READ = 0x20
WIN_READDMA = 0xc8
WIN_READDMA_EXT = 0x25
WIN_READDMA_ONCE = 0xc9
WIN_READDMA_QUEUED = 0xc7
WIN_READDMA_QUEUED_EXT = 0x26
WIN_READ_BUFFER = 0xe4
WIN_READ_EXT = 0x24
WIN_READ_LONG = 0x22
WIN_READ_LONG_ONCE = 0x23
WIN_READ_NATIVE_MAX = 0xf8
WIN_READ_NATIVE_MAX_EXT = 0x27
WIN_READ_ONCE = 0x21
WIN_RECAL = 0x10
WIN_RESTORE = 0x10
WIN_SECURITY_DISABLE = 0xf6
WIN_SECURITY_ERASE_PREPARE = 0xf3
WIN_SECURITY_ERASE_UNIT = 0xf4
WIN_SECURITY_FREEZE_LOCK = 0xf5
WIN_SECURITY_SET_PASS = 0xf1
WIN_SECURITY_UNLOCK = 0xf2
WIN_SEEK = 0x70
WIN_SETFEATURES = 0xef
WIN_SETIDLE1 = 0xe3
WIN_SETIDLE2 = 0x97
WIN_SETMULT = 0xc6
WIN_SET_MAX = 0xf9
WIN_SET_MAX_EXT = 0x37
WIN_SLEEPNOW1 = 0xe6
WIN_SLEEPNOW2 = 0x99
WIN_SMART = 0xb0
WIN_SPECIFY = 0x91
WIN_SRST = 0x8
WIN_STANDBY = 0xe2
WIN_STANDBY2 = 0x96
WIN_STANDBYNOW1 = 0xe0
WIN_STANDBYNOW2 = 0x94
WIN_VERIFY = 0x40
WIN_VERIFY_EXT = 0x42
WIN_VERIFY_ONCE = 0x41
WIN_WRITE = 0x30
WIN_WRITEDMA = 0xca
WIN_WRITEDMA_EXT = 0x35
WIN_WRITEDMA_ONCE = 0xcb
WIN_WRITEDMA_QUEUED = 0xcc
WIN_WRITEDMA_QUEUED_EXT = 0x36
WIN_WRITE_BUFFER = 0xe8
WIN_WRITE_EXT = 0x34
WIN_WRITE_LONG = 0x32
WIN_WRITE_LONG_ONCE = 0x33
WIN_WRITE_ONCE = 0x31
WIN_WRITE_SAME = 0xe9
WIN_WRITE_VERIFY = 0x3c
WNOHANG = 0x1
WNOTHREAD = 0x20000000
WNOWAIT = 0x1000000

View File

@ -446,6 +446,7 @@ const (
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
EXABYTE_ENABLE_NEST = 0xf0
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
@ -543,6 +544,46 @@ const (
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HDIO_DRIVE_CMD = 0x31f
HDIO_DRIVE_CMD_AEB = 0x31e
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
HDIO_DRIVE_RESET = 0x31c
HDIO_DRIVE_TASK = 0x31e
HDIO_DRIVE_TASKFILE = 0x31d
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
HDIO_GETGEO = 0x301
HDIO_GET_32BIT = 0x309
HDIO_GET_ACOUSTIC = 0x30f
HDIO_GET_ADDRESS = 0x310
HDIO_GET_BUSSTATE = 0x31a
HDIO_GET_DMA = 0x30b
HDIO_GET_IDENTITY = 0x30d
HDIO_GET_KEEPSETTINGS = 0x308
HDIO_GET_MULTCOUNT = 0x304
HDIO_GET_NICE = 0x30c
HDIO_GET_NOWERR = 0x30a
HDIO_GET_QDMA = 0x305
HDIO_GET_UNMASKINTR = 0x302
HDIO_GET_WCACHE = 0x30e
HDIO_OBSOLETE_IDENTITY = 0x307
HDIO_SCAN_HWIF = 0x328
HDIO_SET_32BIT = 0x324
HDIO_SET_ACOUSTIC = 0x32c
HDIO_SET_ADDRESS = 0x32f
HDIO_SET_BUSSTATE = 0x32d
HDIO_SET_DMA = 0x326
HDIO_SET_KEEPSETTINGS = 0x323
HDIO_SET_MULTCOUNT = 0x321
HDIO_SET_NICE = 0x329
HDIO_SET_NOWERR = 0x325
HDIO_SET_PIO_MODE = 0x327
HDIO_SET_QDMA = 0x32e
HDIO_SET_UNMASKINTR = 0x322
HDIO_SET_WCACHE = 0x32b
HDIO_SET_XFER = 0x306
HDIO_TRISTATE_HWIF = 0x31b
HDIO_UNREGISTER_HWIF = 0x32a
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
@ -1568,6 +1609,20 @@ const (
SIOCSPGRP = 0x8902
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SMART_AUTOSAVE = 0xd2
SMART_AUTO_OFFLINE = 0xdb
SMART_DISABLE = 0xd9
SMART_ENABLE = 0xd8
SMART_HCYL_PASS = 0xc2
SMART_IMMEDIATE_OFFLINE = 0xd4
SMART_LCYL_PASS = 0x4f
SMART_READ_LOG_SECTOR = 0xd5
SMART_READ_THRESHOLDS = 0xd1
SMART_READ_VALUES = 0xd0
SMART_SAVE = 0xd3
SMART_STATUS = 0xda
SMART_WRITE_LOG_SECTOR = 0xd6
SMART_WRITE_THRESHOLDS = 0xd7
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x2
@ -1952,6 +2007,86 @@ const (
WDIOC_SETPRETIMEOUT = 0xc0045708
WDIOC_SETTIMEOUT = 0xc0045706
WEXITED = 0x4
WIN_ACKMEDIACHANGE = 0xdb
WIN_CHECKPOWERMODE1 = 0xe5
WIN_CHECKPOWERMODE2 = 0x98
WIN_DEVICE_RESET = 0x8
WIN_DIAGNOSE = 0x90
WIN_DOORLOCK = 0xde
WIN_DOORUNLOCK = 0xdf
WIN_DOWNLOAD_MICROCODE = 0x92
WIN_FLUSH_CACHE = 0xe7
WIN_FLUSH_CACHE_EXT = 0xea
WIN_FORMAT = 0x50
WIN_GETMEDIASTATUS = 0xda
WIN_IDENTIFY = 0xec
WIN_IDENTIFY_DMA = 0xee
WIN_IDLEIMMEDIATE = 0xe1
WIN_INIT = 0x60
WIN_MEDIAEJECT = 0xed
WIN_MULTREAD = 0xc4
WIN_MULTREAD_EXT = 0x29
WIN_MULTWRITE = 0xc5
WIN_MULTWRITE_EXT = 0x39
WIN_NOP = 0x0
WIN_PACKETCMD = 0xa0
WIN_PIDENTIFY = 0xa1
WIN_POSTBOOT = 0xdc
WIN_PREBOOT = 0xdd
WIN_QUEUED_SERVICE = 0xa2
WIN_READ = 0x20
WIN_READDMA = 0xc8
WIN_READDMA_EXT = 0x25
WIN_READDMA_ONCE = 0xc9
WIN_READDMA_QUEUED = 0xc7
WIN_READDMA_QUEUED_EXT = 0x26
WIN_READ_BUFFER = 0xe4
WIN_READ_EXT = 0x24
WIN_READ_LONG = 0x22
WIN_READ_LONG_ONCE = 0x23
WIN_READ_NATIVE_MAX = 0xf8
WIN_READ_NATIVE_MAX_EXT = 0x27
WIN_READ_ONCE = 0x21
WIN_RECAL = 0x10
WIN_RESTORE = 0x10
WIN_SECURITY_DISABLE = 0xf6
WIN_SECURITY_ERASE_PREPARE = 0xf3
WIN_SECURITY_ERASE_UNIT = 0xf4
WIN_SECURITY_FREEZE_LOCK = 0xf5
WIN_SECURITY_SET_PASS = 0xf1
WIN_SECURITY_UNLOCK = 0xf2
WIN_SEEK = 0x70
WIN_SETFEATURES = 0xef
WIN_SETIDLE1 = 0xe3
WIN_SETIDLE2 = 0x97
WIN_SETMULT = 0xc6
WIN_SET_MAX = 0xf9
WIN_SET_MAX_EXT = 0x37
WIN_SLEEPNOW1 = 0xe6
WIN_SLEEPNOW2 = 0x99
WIN_SMART = 0xb0
WIN_SPECIFY = 0x91
WIN_SRST = 0x8
WIN_STANDBY = 0xe2
WIN_STANDBY2 = 0x96
WIN_STANDBYNOW1 = 0xe0
WIN_STANDBYNOW2 = 0x94
WIN_VERIFY = 0x40
WIN_VERIFY_EXT = 0x42
WIN_VERIFY_ONCE = 0x41
WIN_WRITE = 0x30
WIN_WRITEDMA = 0xca
WIN_WRITEDMA_EXT = 0x35
WIN_WRITEDMA_ONCE = 0xcb
WIN_WRITEDMA_QUEUED = 0xcc
WIN_WRITEDMA_QUEUED_EXT = 0x36
WIN_WRITE_BUFFER = 0xe8
WIN_WRITE_EXT = 0x34
WIN_WRITE_LONG = 0x32
WIN_WRITE_LONG_ONCE = 0x33
WIN_WRITE_ONCE = 0x31
WIN_WRITE_SAME = 0xe9
WIN_WRITE_VERIFY = 0x3c
WNOHANG = 0x1
WNOTHREAD = 0x20000000
WNOWAIT = 0x1000000

View File

@ -447,6 +447,7 @@ const (
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
EXABYTE_ENABLE_NEST = 0xf0
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
@ -545,6 +546,46 @@ const (
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HDIO_DRIVE_CMD = 0x31f
HDIO_DRIVE_CMD_AEB = 0x31e
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
HDIO_DRIVE_RESET = 0x31c
HDIO_DRIVE_TASK = 0x31e
HDIO_DRIVE_TASKFILE = 0x31d
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
HDIO_GETGEO = 0x301
HDIO_GET_32BIT = 0x309
HDIO_GET_ACOUSTIC = 0x30f
HDIO_GET_ADDRESS = 0x310
HDIO_GET_BUSSTATE = 0x31a
HDIO_GET_DMA = 0x30b
HDIO_GET_IDENTITY = 0x30d
HDIO_GET_KEEPSETTINGS = 0x308
HDIO_GET_MULTCOUNT = 0x304
HDIO_GET_NICE = 0x30c
HDIO_GET_NOWERR = 0x30a
HDIO_GET_QDMA = 0x305
HDIO_GET_UNMASKINTR = 0x302
HDIO_GET_WCACHE = 0x30e
HDIO_OBSOLETE_IDENTITY = 0x307
HDIO_SCAN_HWIF = 0x328
HDIO_SET_32BIT = 0x324
HDIO_SET_ACOUSTIC = 0x32c
HDIO_SET_ADDRESS = 0x32f
HDIO_SET_BUSSTATE = 0x32d
HDIO_SET_DMA = 0x326
HDIO_SET_KEEPSETTINGS = 0x323
HDIO_SET_MULTCOUNT = 0x321
HDIO_SET_NICE = 0x329
HDIO_SET_NOWERR = 0x325
HDIO_SET_PIO_MODE = 0x327
HDIO_SET_QDMA = 0x32e
HDIO_SET_UNMASKINTR = 0x322
HDIO_SET_WCACHE = 0x32b
HDIO_SET_XFER = 0x306
HDIO_TRISTATE_HWIF = 0x31b
HDIO_UNREGISTER_HWIF = 0x32a
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
@ -1551,6 +1592,20 @@ const (
SIOCSPGRP = 0x8902
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SMART_AUTOSAVE = 0xd2
SMART_AUTO_OFFLINE = 0xdb
SMART_DISABLE = 0xd9
SMART_ENABLE = 0xd8
SMART_HCYL_PASS = 0xc2
SMART_IMMEDIATE_OFFLINE = 0xd4
SMART_LCYL_PASS = 0x4f
SMART_READ_LOG_SECTOR = 0xd5
SMART_READ_THRESHOLDS = 0xd1
SMART_READ_VALUES = 0xd0
SMART_SAVE = 0xd3
SMART_STATUS = 0xda
SMART_WRITE_LOG_SECTOR = 0xd6
SMART_WRITE_THRESHOLDS = 0xd7
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x2
@ -1935,6 +1990,86 @@ const (
WDIOC_SETPRETIMEOUT = 0xc0045708
WDIOC_SETTIMEOUT = 0xc0045706
WEXITED = 0x4
WIN_ACKMEDIACHANGE = 0xdb
WIN_CHECKPOWERMODE1 = 0xe5
WIN_CHECKPOWERMODE2 = 0x98
WIN_DEVICE_RESET = 0x8
WIN_DIAGNOSE = 0x90
WIN_DOORLOCK = 0xde
WIN_DOORUNLOCK = 0xdf
WIN_DOWNLOAD_MICROCODE = 0x92
WIN_FLUSH_CACHE = 0xe7
WIN_FLUSH_CACHE_EXT = 0xea
WIN_FORMAT = 0x50
WIN_GETMEDIASTATUS = 0xda
WIN_IDENTIFY = 0xec
WIN_IDENTIFY_DMA = 0xee
WIN_IDLEIMMEDIATE = 0xe1
WIN_INIT = 0x60
WIN_MEDIAEJECT = 0xed
WIN_MULTREAD = 0xc4
WIN_MULTREAD_EXT = 0x29
WIN_MULTWRITE = 0xc5
WIN_MULTWRITE_EXT = 0x39
WIN_NOP = 0x0
WIN_PACKETCMD = 0xa0
WIN_PIDENTIFY = 0xa1
WIN_POSTBOOT = 0xdc
WIN_PREBOOT = 0xdd
WIN_QUEUED_SERVICE = 0xa2
WIN_READ = 0x20
WIN_READDMA = 0xc8
WIN_READDMA_EXT = 0x25
WIN_READDMA_ONCE = 0xc9
WIN_READDMA_QUEUED = 0xc7
WIN_READDMA_QUEUED_EXT = 0x26
WIN_READ_BUFFER = 0xe4
WIN_READ_EXT = 0x24
WIN_READ_LONG = 0x22
WIN_READ_LONG_ONCE = 0x23
WIN_READ_NATIVE_MAX = 0xf8
WIN_READ_NATIVE_MAX_EXT = 0x27
WIN_READ_ONCE = 0x21
WIN_RECAL = 0x10
WIN_RESTORE = 0x10
WIN_SECURITY_DISABLE = 0xf6
WIN_SECURITY_ERASE_PREPARE = 0xf3
WIN_SECURITY_ERASE_UNIT = 0xf4
WIN_SECURITY_FREEZE_LOCK = 0xf5
WIN_SECURITY_SET_PASS = 0xf1
WIN_SECURITY_UNLOCK = 0xf2
WIN_SEEK = 0x70
WIN_SETFEATURES = 0xef
WIN_SETIDLE1 = 0xe3
WIN_SETIDLE2 = 0x97
WIN_SETMULT = 0xc6
WIN_SET_MAX = 0xf9
WIN_SET_MAX_EXT = 0x37
WIN_SLEEPNOW1 = 0xe6
WIN_SLEEPNOW2 = 0x99
WIN_SMART = 0xb0
WIN_SPECIFY = 0x91
WIN_SRST = 0x8
WIN_STANDBY = 0xe2
WIN_STANDBY2 = 0x96
WIN_STANDBYNOW1 = 0xe0
WIN_STANDBYNOW2 = 0x94
WIN_VERIFY = 0x40
WIN_VERIFY_EXT = 0x42
WIN_VERIFY_ONCE = 0x41
WIN_WRITE = 0x30
WIN_WRITEDMA = 0xca
WIN_WRITEDMA_EXT = 0x35
WIN_WRITEDMA_ONCE = 0xcb
WIN_WRITEDMA_QUEUED = 0xcc
WIN_WRITEDMA_QUEUED_EXT = 0x36
WIN_WRITE_BUFFER = 0xe8
WIN_WRITE_EXT = 0x34
WIN_WRITE_LONG = 0x32
WIN_WRITE_LONG_ONCE = 0x33
WIN_WRITE_ONCE = 0x31
WIN_WRITE_SAME = 0xe9
WIN_WRITE_VERIFY = 0x3c
WNOHANG = 0x1
WNOTHREAD = 0x20000000
WNOWAIT = 0x1000000

View File

@ -446,6 +446,7 @@ const (
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
EXABYTE_ENABLE_NEST = 0xf0
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
@ -543,6 +544,46 @@ const (
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HDIO_DRIVE_CMD = 0x31f
HDIO_DRIVE_CMD_AEB = 0x31e
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
HDIO_DRIVE_RESET = 0x31c
HDIO_DRIVE_TASK = 0x31e
HDIO_DRIVE_TASKFILE = 0x31d
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
HDIO_GETGEO = 0x301
HDIO_GET_32BIT = 0x309
HDIO_GET_ACOUSTIC = 0x30f
HDIO_GET_ADDRESS = 0x310
HDIO_GET_BUSSTATE = 0x31a
HDIO_GET_DMA = 0x30b
HDIO_GET_IDENTITY = 0x30d
HDIO_GET_KEEPSETTINGS = 0x308
HDIO_GET_MULTCOUNT = 0x304
HDIO_GET_NICE = 0x30c
HDIO_GET_NOWERR = 0x30a
HDIO_GET_QDMA = 0x305
HDIO_GET_UNMASKINTR = 0x302
HDIO_GET_WCACHE = 0x30e
HDIO_OBSOLETE_IDENTITY = 0x307
HDIO_SCAN_HWIF = 0x328
HDIO_SET_32BIT = 0x324
HDIO_SET_ACOUSTIC = 0x32c
HDIO_SET_ADDRESS = 0x32f
HDIO_SET_BUSSTATE = 0x32d
HDIO_SET_DMA = 0x326
HDIO_SET_KEEPSETTINGS = 0x323
HDIO_SET_MULTCOUNT = 0x321
HDIO_SET_NICE = 0x329
HDIO_SET_NOWERR = 0x325
HDIO_SET_PIO_MODE = 0x327
HDIO_SET_QDMA = 0x32e
HDIO_SET_UNMASKINTR = 0x322
HDIO_SET_WCACHE = 0x32b
HDIO_SET_XFER = 0x306
HDIO_TRISTATE_HWIF = 0x31b
HDIO_UNREGISTER_HWIF = 0x32a
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
@ -1562,6 +1603,20 @@ const (
SIOCSPGRP = 0x80047308
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SMART_AUTOSAVE = 0xd2
SMART_AUTO_OFFLINE = 0xdb
SMART_DISABLE = 0xd9
SMART_ENABLE = 0xd8
SMART_HCYL_PASS = 0xc2
SMART_IMMEDIATE_OFFLINE = 0xd4
SMART_LCYL_PASS = 0x4f
SMART_READ_LOG_SECTOR = 0xd5
SMART_READ_THRESHOLDS = 0xd1
SMART_READ_VALUES = 0xd0
SMART_SAVE = 0xd3
SMART_STATUS = 0xda
SMART_WRITE_LOG_SECTOR = 0xd6
SMART_WRITE_THRESHOLDS = 0xd7
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x1
@ -1949,6 +2004,86 @@ const (
WDIOC_SETPRETIMEOUT = 0xc0045708
WDIOC_SETTIMEOUT = 0xc0045706
WEXITED = 0x4
WIN_ACKMEDIACHANGE = 0xdb
WIN_CHECKPOWERMODE1 = 0xe5
WIN_CHECKPOWERMODE2 = 0x98
WIN_DEVICE_RESET = 0x8
WIN_DIAGNOSE = 0x90
WIN_DOORLOCK = 0xde
WIN_DOORUNLOCK = 0xdf
WIN_DOWNLOAD_MICROCODE = 0x92
WIN_FLUSH_CACHE = 0xe7
WIN_FLUSH_CACHE_EXT = 0xea
WIN_FORMAT = 0x50
WIN_GETMEDIASTATUS = 0xda
WIN_IDENTIFY = 0xec
WIN_IDENTIFY_DMA = 0xee
WIN_IDLEIMMEDIATE = 0xe1
WIN_INIT = 0x60
WIN_MEDIAEJECT = 0xed
WIN_MULTREAD = 0xc4
WIN_MULTREAD_EXT = 0x29
WIN_MULTWRITE = 0xc5
WIN_MULTWRITE_EXT = 0x39
WIN_NOP = 0x0
WIN_PACKETCMD = 0xa0
WIN_PIDENTIFY = 0xa1
WIN_POSTBOOT = 0xdc
WIN_PREBOOT = 0xdd
WIN_QUEUED_SERVICE = 0xa2
WIN_READ = 0x20
WIN_READDMA = 0xc8
WIN_READDMA_EXT = 0x25
WIN_READDMA_ONCE = 0xc9
WIN_READDMA_QUEUED = 0xc7
WIN_READDMA_QUEUED_EXT = 0x26
WIN_READ_BUFFER = 0xe4
WIN_READ_EXT = 0x24
WIN_READ_LONG = 0x22
WIN_READ_LONG_ONCE = 0x23
WIN_READ_NATIVE_MAX = 0xf8
WIN_READ_NATIVE_MAX_EXT = 0x27
WIN_READ_ONCE = 0x21
WIN_RECAL = 0x10
WIN_RESTORE = 0x10
WIN_SECURITY_DISABLE = 0xf6
WIN_SECURITY_ERASE_PREPARE = 0xf3
WIN_SECURITY_ERASE_UNIT = 0xf4
WIN_SECURITY_FREEZE_LOCK = 0xf5
WIN_SECURITY_SET_PASS = 0xf1
WIN_SECURITY_UNLOCK = 0xf2
WIN_SEEK = 0x70
WIN_SETFEATURES = 0xef
WIN_SETIDLE1 = 0xe3
WIN_SETIDLE2 = 0x97
WIN_SETMULT = 0xc6
WIN_SET_MAX = 0xf9
WIN_SET_MAX_EXT = 0x37
WIN_SLEEPNOW1 = 0xe6
WIN_SLEEPNOW2 = 0x99
WIN_SMART = 0xb0
WIN_SPECIFY = 0x91
WIN_SRST = 0x8
WIN_STANDBY = 0xe2
WIN_STANDBY2 = 0x96
WIN_STANDBYNOW1 = 0xe0
WIN_STANDBYNOW2 = 0x94
WIN_VERIFY = 0x40
WIN_VERIFY_EXT = 0x42
WIN_VERIFY_ONCE = 0x41
WIN_WRITE = 0x30
WIN_WRITEDMA = 0xca
WIN_WRITEDMA_EXT = 0x35
WIN_WRITEDMA_ONCE = 0xcb
WIN_WRITEDMA_QUEUED = 0xcc
WIN_WRITEDMA_QUEUED_EXT = 0x36
WIN_WRITE_BUFFER = 0xe8
WIN_WRITE_EXT = 0x34
WIN_WRITE_LONG = 0x32
WIN_WRITE_LONG_ONCE = 0x33
WIN_WRITE_ONCE = 0x31
WIN_WRITE_SAME = 0xe9
WIN_WRITE_VERIFY = 0x3c
WNOHANG = 0x1
WNOTHREAD = 0x20000000
WNOWAIT = 0x1000000

View File

@ -446,6 +446,7 @@ const (
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
EXABYTE_ENABLE_NEST = 0xf0
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
@ -543,6 +544,46 @@ const (
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HDIO_DRIVE_CMD = 0x31f
HDIO_DRIVE_CMD_AEB = 0x31e
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
HDIO_DRIVE_RESET = 0x31c
HDIO_DRIVE_TASK = 0x31e
HDIO_DRIVE_TASKFILE = 0x31d
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
HDIO_GETGEO = 0x301
HDIO_GET_32BIT = 0x309
HDIO_GET_ACOUSTIC = 0x30f
HDIO_GET_ADDRESS = 0x310
HDIO_GET_BUSSTATE = 0x31a
HDIO_GET_DMA = 0x30b
HDIO_GET_IDENTITY = 0x30d
HDIO_GET_KEEPSETTINGS = 0x308
HDIO_GET_MULTCOUNT = 0x304
HDIO_GET_NICE = 0x30c
HDIO_GET_NOWERR = 0x30a
HDIO_GET_QDMA = 0x305
HDIO_GET_UNMASKINTR = 0x302
HDIO_GET_WCACHE = 0x30e
HDIO_OBSOLETE_IDENTITY = 0x307
HDIO_SCAN_HWIF = 0x328
HDIO_SET_32BIT = 0x324
HDIO_SET_ACOUSTIC = 0x32c
HDIO_SET_ADDRESS = 0x32f
HDIO_SET_BUSSTATE = 0x32d
HDIO_SET_DMA = 0x326
HDIO_SET_KEEPSETTINGS = 0x323
HDIO_SET_MULTCOUNT = 0x321
HDIO_SET_NICE = 0x329
HDIO_SET_NOWERR = 0x325
HDIO_SET_PIO_MODE = 0x327
HDIO_SET_QDMA = 0x32e
HDIO_SET_UNMASKINTR = 0x322
HDIO_SET_WCACHE = 0x32b
HDIO_SET_XFER = 0x306
HDIO_TRISTATE_HWIF = 0x31b
HDIO_UNREGISTER_HWIF = 0x32a
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
@ -1562,6 +1603,20 @@ const (
SIOCSPGRP = 0x80047308
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SMART_AUTOSAVE = 0xd2
SMART_AUTO_OFFLINE = 0xdb
SMART_DISABLE = 0xd9
SMART_ENABLE = 0xd8
SMART_HCYL_PASS = 0xc2
SMART_IMMEDIATE_OFFLINE = 0xd4
SMART_LCYL_PASS = 0x4f
SMART_READ_LOG_SECTOR = 0xd5
SMART_READ_THRESHOLDS = 0xd1
SMART_READ_VALUES = 0xd0
SMART_SAVE = 0xd3
SMART_STATUS = 0xda
SMART_WRITE_LOG_SECTOR = 0xd6
SMART_WRITE_THRESHOLDS = 0xd7
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x1
@ -1949,6 +2004,86 @@ const (
WDIOC_SETPRETIMEOUT = 0xc0045708
WDIOC_SETTIMEOUT = 0xc0045706
WEXITED = 0x4
WIN_ACKMEDIACHANGE = 0xdb
WIN_CHECKPOWERMODE1 = 0xe5
WIN_CHECKPOWERMODE2 = 0x98
WIN_DEVICE_RESET = 0x8
WIN_DIAGNOSE = 0x90
WIN_DOORLOCK = 0xde
WIN_DOORUNLOCK = 0xdf
WIN_DOWNLOAD_MICROCODE = 0x92
WIN_FLUSH_CACHE = 0xe7
WIN_FLUSH_CACHE_EXT = 0xea
WIN_FORMAT = 0x50
WIN_GETMEDIASTATUS = 0xda
WIN_IDENTIFY = 0xec
WIN_IDENTIFY_DMA = 0xee
WIN_IDLEIMMEDIATE = 0xe1
WIN_INIT = 0x60
WIN_MEDIAEJECT = 0xed
WIN_MULTREAD = 0xc4
WIN_MULTREAD_EXT = 0x29
WIN_MULTWRITE = 0xc5
WIN_MULTWRITE_EXT = 0x39
WIN_NOP = 0x0
WIN_PACKETCMD = 0xa0
WIN_PIDENTIFY = 0xa1
WIN_POSTBOOT = 0xdc
WIN_PREBOOT = 0xdd
WIN_QUEUED_SERVICE = 0xa2
WIN_READ = 0x20
WIN_READDMA = 0xc8
WIN_READDMA_EXT = 0x25
WIN_READDMA_ONCE = 0xc9
WIN_READDMA_QUEUED = 0xc7
WIN_READDMA_QUEUED_EXT = 0x26
WIN_READ_BUFFER = 0xe4
WIN_READ_EXT = 0x24
WIN_READ_LONG = 0x22
WIN_READ_LONG_ONCE = 0x23
WIN_READ_NATIVE_MAX = 0xf8
WIN_READ_NATIVE_MAX_EXT = 0x27
WIN_READ_ONCE = 0x21
WIN_RECAL = 0x10
WIN_RESTORE = 0x10
WIN_SECURITY_DISABLE = 0xf6
WIN_SECURITY_ERASE_PREPARE = 0xf3
WIN_SECURITY_ERASE_UNIT = 0xf4
WIN_SECURITY_FREEZE_LOCK = 0xf5
WIN_SECURITY_SET_PASS = 0xf1
WIN_SECURITY_UNLOCK = 0xf2
WIN_SEEK = 0x70
WIN_SETFEATURES = 0xef
WIN_SETIDLE1 = 0xe3
WIN_SETIDLE2 = 0x97
WIN_SETMULT = 0xc6
WIN_SET_MAX = 0xf9
WIN_SET_MAX_EXT = 0x37
WIN_SLEEPNOW1 = 0xe6
WIN_SLEEPNOW2 = 0x99
WIN_SMART = 0xb0
WIN_SPECIFY = 0x91
WIN_SRST = 0x8
WIN_STANDBY = 0xe2
WIN_STANDBY2 = 0x96
WIN_STANDBYNOW1 = 0xe0
WIN_STANDBYNOW2 = 0x94
WIN_VERIFY = 0x40
WIN_VERIFY_EXT = 0x42
WIN_VERIFY_ONCE = 0x41
WIN_WRITE = 0x30
WIN_WRITEDMA = 0xca
WIN_WRITEDMA_EXT = 0x35
WIN_WRITEDMA_ONCE = 0xcb
WIN_WRITEDMA_QUEUED = 0xcc
WIN_WRITEDMA_QUEUED_EXT = 0x36
WIN_WRITE_BUFFER = 0xe8
WIN_WRITE_EXT = 0x34
WIN_WRITE_LONG = 0x32
WIN_WRITE_LONG_ONCE = 0x33
WIN_WRITE_ONCE = 0x31
WIN_WRITE_SAME = 0xe9
WIN_WRITE_VERIFY = 0x3c
WNOHANG = 0x1
WNOTHREAD = 0x20000000
WNOWAIT = 0x1000000

View File

@ -446,6 +446,7 @@ const (
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
EXABYTE_ENABLE_NEST = 0xf0
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
@ -543,6 +544,46 @@ const (
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HDIO_DRIVE_CMD = 0x31f
HDIO_DRIVE_CMD_AEB = 0x31e
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
HDIO_DRIVE_RESET = 0x31c
HDIO_DRIVE_TASK = 0x31e
HDIO_DRIVE_TASKFILE = 0x31d
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
HDIO_GETGEO = 0x301
HDIO_GET_32BIT = 0x309
HDIO_GET_ACOUSTIC = 0x30f
HDIO_GET_ADDRESS = 0x310
HDIO_GET_BUSSTATE = 0x31a
HDIO_GET_DMA = 0x30b
HDIO_GET_IDENTITY = 0x30d
HDIO_GET_KEEPSETTINGS = 0x308
HDIO_GET_MULTCOUNT = 0x304
HDIO_GET_NICE = 0x30c
HDIO_GET_NOWERR = 0x30a
HDIO_GET_QDMA = 0x305
HDIO_GET_UNMASKINTR = 0x302
HDIO_GET_WCACHE = 0x30e
HDIO_OBSOLETE_IDENTITY = 0x307
HDIO_SCAN_HWIF = 0x328
HDIO_SET_32BIT = 0x324
HDIO_SET_ACOUSTIC = 0x32c
HDIO_SET_ADDRESS = 0x32f
HDIO_SET_BUSSTATE = 0x32d
HDIO_SET_DMA = 0x326
HDIO_SET_KEEPSETTINGS = 0x323
HDIO_SET_MULTCOUNT = 0x321
HDIO_SET_NICE = 0x329
HDIO_SET_NOWERR = 0x325
HDIO_SET_PIO_MODE = 0x327
HDIO_SET_QDMA = 0x32e
HDIO_SET_UNMASKINTR = 0x322
HDIO_SET_WCACHE = 0x32b
HDIO_SET_XFER = 0x306
HDIO_TRISTATE_HWIF = 0x31b
HDIO_UNREGISTER_HWIF = 0x32a
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
@ -1562,6 +1603,20 @@ const (
SIOCSPGRP = 0x80047308
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SMART_AUTOSAVE = 0xd2
SMART_AUTO_OFFLINE = 0xdb
SMART_DISABLE = 0xd9
SMART_ENABLE = 0xd8
SMART_HCYL_PASS = 0xc2
SMART_IMMEDIATE_OFFLINE = 0xd4
SMART_LCYL_PASS = 0x4f
SMART_READ_LOG_SECTOR = 0xd5
SMART_READ_THRESHOLDS = 0xd1
SMART_READ_VALUES = 0xd0
SMART_SAVE = 0xd3
SMART_STATUS = 0xda
SMART_WRITE_LOG_SECTOR = 0xd6
SMART_WRITE_THRESHOLDS = 0xd7
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x1
@ -1949,6 +2004,86 @@ const (
WDIOC_SETPRETIMEOUT = 0xc0045708
WDIOC_SETTIMEOUT = 0xc0045706
WEXITED = 0x4
WIN_ACKMEDIACHANGE = 0xdb
WIN_CHECKPOWERMODE1 = 0xe5
WIN_CHECKPOWERMODE2 = 0x98
WIN_DEVICE_RESET = 0x8
WIN_DIAGNOSE = 0x90
WIN_DOORLOCK = 0xde
WIN_DOORUNLOCK = 0xdf
WIN_DOWNLOAD_MICROCODE = 0x92
WIN_FLUSH_CACHE = 0xe7
WIN_FLUSH_CACHE_EXT = 0xea
WIN_FORMAT = 0x50
WIN_GETMEDIASTATUS = 0xda
WIN_IDENTIFY = 0xec
WIN_IDENTIFY_DMA = 0xee
WIN_IDLEIMMEDIATE = 0xe1
WIN_INIT = 0x60
WIN_MEDIAEJECT = 0xed
WIN_MULTREAD = 0xc4
WIN_MULTREAD_EXT = 0x29
WIN_MULTWRITE = 0xc5
WIN_MULTWRITE_EXT = 0x39
WIN_NOP = 0x0
WIN_PACKETCMD = 0xa0
WIN_PIDENTIFY = 0xa1
WIN_POSTBOOT = 0xdc
WIN_PREBOOT = 0xdd
WIN_QUEUED_SERVICE = 0xa2
WIN_READ = 0x20
WIN_READDMA = 0xc8
WIN_READDMA_EXT = 0x25
WIN_READDMA_ONCE = 0xc9
WIN_READDMA_QUEUED = 0xc7
WIN_READDMA_QUEUED_EXT = 0x26
WIN_READ_BUFFER = 0xe4
WIN_READ_EXT = 0x24
WIN_READ_LONG = 0x22
WIN_READ_LONG_ONCE = 0x23
WIN_READ_NATIVE_MAX = 0xf8
WIN_READ_NATIVE_MAX_EXT = 0x27
WIN_READ_ONCE = 0x21
WIN_RECAL = 0x10
WIN_RESTORE = 0x10
WIN_SECURITY_DISABLE = 0xf6
WIN_SECURITY_ERASE_PREPARE = 0xf3
WIN_SECURITY_ERASE_UNIT = 0xf4
WIN_SECURITY_FREEZE_LOCK = 0xf5
WIN_SECURITY_SET_PASS = 0xf1
WIN_SECURITY_UNLOCK = 0xf2
WIN_SEEK = 0x70
WIN_SETFEATURES = 0xef
WIN_SETIDLE1 = 0xe3
WIN_SETIDLE2 = 0x97
WIN_SETMULT = 0xc6
WIN_SET_MAX = 0xf9
WIN_SET_MAX_EXT = 0x37
WIN_SLEEPNOW1 = 0xe6
WIN_SLEEPNOW2 = 0x99
WIN_SMART = 0xb0
WIN_SPECIFY = 0x91
WIN_SRST = 0x8
WIN_STANDBY = 0xe2
WIN_STANDBY2 = 0x96
WIN_STANDBYNOW1 = 0xe0
WIN_STANDBYNOW2 = 0x94
WIN_VERIFY = 0x40
WIN_VERIFY_EXT = 0x42
WIN_VERIFY_ONCE = 0x41
WIN_WRITE = 0x30
WIN_WRITEDMA = 0xca
WIN_WRITEDMA_EXT = 0x35
WIN_WRITEDMA_ONCE = 0xcb
WIN_WRITEDMA_QUEUED = 0xcc
WIN_WRITEDMA_QUEUED_EXT = 0x36
WIN_WRITE_BUFFER = 0xe8
WIN_WRITE_EXT = 0x34
WIN_WRITE_LONG = 0x32
WIN_WRITE_LONG_ONCE = 0x33
WIN_WRITE_ONCE = 0x31
WIN_WRITE_SAME = 0xe9
WIN_WRITE_VERIFY = 0x3c
WNOHANG = 0x1
WNOTHREAD = 0x20000000
WNOWAIT = 0x1000000

View File

@ -446,6 +446,7 @@ const (
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
EXABYTE_ENABLE_NEST = 0xf0
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
@ -543,6 +544,46 @@ const (
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HDIO_DRIVE_CMD = 0x31f
HDIO_DRIVE_CMD_AEB = 0x31e
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
HDIO_DRIVE_RESET = 0x31c
HDIO_DRIVE_TASK = 0x31e
HDIO_DRIVE_TASKFILE = 0x31d
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
HDIO_GETGEO = 0x301
HDIO_GET_32BIT = 0x309
HDIO_GET_ACOUSTIC = 0x30f
HDIO_GET_ADDRESS = 0x310
HDIO_GET_BUSSTATE = 0x31a
HDIO_GET_DMA = 0x30b
HDIO_GET_IDENTITY = 0x30d
HDIO_GET_KEEPSETTINGS = 0x308
HDIO_GET_MULTCOUNT = 0x304
HDIO_GET_NICE = 0x30c
HDIO_GET_NOWERR = 0x30a
HDIO_GET_QDMA = 0x305
HDIO_GET_UNMASKINTR = 0x302
HDIO_GET_WCACHE = 0x30e
HDIO_OBSOLETE_IDENTITY = 0x307
HDIO_SCAN_HWIF = 0x328
HDIO_SET_32BIT = 0x324
HDIO_SET_ACOUSTIC = 0x32c
HDIO_SET_ADDRESS = 0x32f
HDIO_SET_BUSSTATE = 0x32d
HDIO_SET_DMA = 0x326
HDIO_SET_KEEPSETTINGS = 0x323
HDIO_SET_MULTCOUNT = 0x321
HDIO_SET_NICE = 0x329
HDIO_SET_NOWERR = 0x325
HDIO_SET_PIO_MODE = 0x327
HDIO_SET_QDMA = 0x32e
HDIO_SET_UNMASKINTR = 0x322
HDIO_SET_WCACHE = 0x32b
HDIO_SET_XFER = 0x306
HDIO_TRISTATE_HWIF = 0x31b
HDIO_UNREGISTER_HWIF = 0x32a
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
@ -1562,6 +1603,20 @@ const (
SIOCSPGRP = 0x80047308
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SMART_AUTOSAVE = 0xd2
SMART_AUTO_OFFLINE = 0xdb
SMART_DISABLE = 0xd9
SMART_ENABLE = 0xd8
SMART_HCYL_PASS = 0xc2
SMART_IMMEDIATE_OFFLINE = 0xd4
SMART_LCYL_PASS = 0x4f
SMART_READ_LOG_SECTOR = 0xd5
SMART_READ_THRESHOLDS = 0xd1
SMART_READ_VALUES = 0xd0
SMART_SAVE = 0xd3
SMART_STATUS = 0xda
SMART_WRITE_LOG_SECTOR = 0xd6
SMART_WRITE_THRESHOLDS = 0xd7
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x1
@ -1949,6 +2004,86 @@ const (
WDIOC_SETPRETIMEOUT = 0xc0045708
WDIOC_SETTIMEOUT = 0xc0045706
WEXITED = 0x4
WIN_ACKMEDIACHANGE = 0xdb
WIN_CHECKPOWERMODE1 = 0xe5
WIN_CHECKPOWERMODE2 = 0x98
WIN_DEVICE_RESET = 0x8
WIN_DIAGNOSE = 0x90
WIN_DOORLOCK = 0xde
WIN_DOORUNLOCK = 0xdf
WIN_DOWNLOAD_MICROCODE = 0x92
WIN_FLUSH_CACHE = 0xe7
WIN_FLUSH_CACHE_EXT = 0xea
WIN_FORMAT = 0x50
WIN_GETMEDIASTATUS = 0xda
WIN_IDENTIFY = 0xec
WIN_IDENTIFY_DMA = 0xee
WIN_IDLEIMMEDIATE = 0xe1
WIN_INIT = 0x60
WIN_MEDIAEJECT = 0xed
WIN_MULTREAD = 0xc4
WIN_MULTREAD_EXT = 0x29
WIN_MULTWRITE = 0xc5
WIN_MULTWRITE_EXT = 0x39
WIN_NOP = 0x0
WIN_PACKETCMD = 0xa0
WIN_PIDENTIFY = 0xa1
WIN_POSTBOOT = 0xdc
WIN_PREBOOT = 0xdd
WIN_QUEUED_SERVICE = 0xa2
WIN_READ = 0x20
WIN_READDMA = 0xc8
WIN_READDMA_EXT = 0x25
WIN_READDMA_ONCE = 0xc9
WIN_READDMA_QUEUED = 0xc7
WIN_READDMA_QUEUED_EXT = 0x26
WIN_READ_BUFFER = 0xe4
WIN_READ_EXT = 0x24
WIN_READ_LONG = 0x22
WIN_READ_LONG_ONCE = 0x23
WIN_READ_NATIVE_MAX = 0xf8
WIN_READ_NATIVE_MAX_EXT = 0x27
WIN_READ_ONCE = 0x21
WIN_RECAL = 0x10
WIN_RESTORE = 0x10
WIN_SECURITY_DISABLE = 0xf6
WIN_SECURITY_ERASE_PREPARE = 0xf3
WIN_SECURITY_ERASE_UNIT = 0xf4
WIN_SECURITY_FREEZE_LOCK = 0xf5
WIN_SECURITY_SET_PASS = 0xf1
WIN_SECURITY_UNLOCK = 0xf2
WIN_SEEK = 0x70
WIN_SETFEATURES = 0xef
WIN_SETIDLE1 = 0xe3
WIN_SETIDLE2 = 0x97
WIN_SETMULT = 0xc6
WIN_SET_MAX = 0xf9
WIN_SET_MAX_EXT = 0x37
WIN_SLEEPNOW1 = 0xe6
WIN_SLEEPNOW2 = 0x99
WIN_SMART = 0xb0
WIN_SPECIFY = 0x91
WIN_SRST = 0x8
WIN_STANDBY = 0xe2
WIN_STANDBY2 = 0x96
WIN_STANDBYNOW1 = 0xe0
WIN_STANDBYNOW2 = 0x94
WIN_VERIFY = 0x40
WIN_VERIFY_EXT = 0x42
WIN_VERIFY_ONCE = 0x41
WIN_WRITE = 0x30
WIN_WRITEDMA = 0xca
WIN_WRITEDMA_EXT = 0x35
WIN_WRITEDMA_ONCE = 0xcb
WIN_WRITEDMA_QUEUED = 0xcc
WIN_WRITEDMA_QUEUED_EXT = 0x36
WIN_WRITE_BUFFER = 0xe8
WIN_WRITE_EXT = 0x34
WIN_WRITE_LONG = 0x32
WIN_WRITE_LONG_ONCE = 0x33
WIN_WRITE_ONCE = 0x31
WIN_WRITE_SAME = 0xe9
WIN_WRITE_VERIFY = 0x3c
WNOHANG = 0x1
WNOTHREAD = 0x20000000
WNOWAIT = 0x1000000

View File

@ -446,6 +446,7 @@ const (
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
EXABYTE_ENABLE_NEST = 0xf0
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000000
@ -543,6 +544,46 @@ const (
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HDIO_DRIVE_CMD = 0x31f
HDIO_DRIVE_CMD_AEB = 0x31e
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
HDIO_DRIVE_RESET = 0x31c
HDIO_DRIVE_TASK = 0x31e
HDIO_DRIVE_TASKFILE = 0x31d
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
HDIO_GETGEO = 0x301
HDIO_GET_32BIT = 0x309
HDIO_GET_ACOUSTIC = 0x30f
HDIO_GET_ADDRESS = 0x310
HDIO_GET_BUSSTATE = 0x31a
HDIO_GET_DMA = 0x30b
HDIO_GET_IDENTITY = 0x30d
HDIO_GET_KEEPSETTINGS = 0x308
HDIO_GET_MULTCOUNT = 0x304
HDIO_GET_NICE = 0x30c
HDIO_GET_NOWERR = 0x30a
HDIO_GET_QDMA = 0x305
HDIO_GET_UNMASKINTR = 0x302
HDIO_GET_WCACHE = 0x30e
HDIO_OBSOLETE_IDENTITY = 0x307
HDIO_SCAN_HWIF = 0x328
HDIO_SET_32BIT = 0x324
HDIO_SET_ACOUSTIC = 0x32c
HDIO_SET_ADDRESS = 0x32f
HDIO_SET_BUSSTATE = 0x32d
HDIO_SET_DMA = 0x326
HDIO_SET_KEEPSETTINGS = 0x323
HDIO_SET_MULTCOUNT = 0x321
HDIO_SET_NICE = 0x329
HDIO_SET_NOWERR = 0x325
HDIO_SET_PIO_MODE = 0x327
HDIO_SET_QDMA = 0x32e
HDIO_SET_UNMASKINTR = 0x322
HDIO_SET_WCACHE = 0x32b
HDIO_SET_XFER = 0x306
HDIO_TRISTATE_HWIF = 0x31b
HDIO_UNREGISTER_HWIF = 0x32a
HUPCL = 0x4000
IBSHIFT = 0x10
ICANON = 0x100
@ -1618,6 +1659,20 @@ const (
SIOCSPGRP = 0x8902
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SMART_AUTOSAVE = 0xd2
SMART_AUTO_OFFLINE = 0xdb
SMART_DISABLE = 0xd9
SMART_ENABLE = 0xd8
SMART_HCYL_PASS = 0xc2
SMART_IMMEDIATE_OFFLINE = 0xd4
SMART_LCYL_PASS = 0x4f
SMART_READ_LOG_SECTOR = 0xd5
SMART_READ_THRESHOLDS = 0xd1
SMART_READ_VALUES = 0xd0
SMART_SAVE = 0xd3
SMART_STATUS = 0xda
SMART_WRITE_LOG_SECTOR = 0xd6
SMART_WRITE_THRESHOLDS = 0xd7
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x2
@ -2006,6 +2061,86 @@ const (
WDIOC_SETPRETIMEOUT = 0xc0045708
WDIOC_SETTIMEOUT = 0xc0045706
WEXITED = 0x4
WIN_ACKMEDIACHANGE = 0xdb
WIN_CHECKPOWERMODE1 = 0xe5
WIN_CHECKPOWERMODE2 = 0x98
WIN_DEVICE_RESET = 0x8
WIN_DIAGNOSE = 0x90
WIN_DOORLOCK = 0xde
WIN_DOORUNLOCK = 0xdf
WIN_DOWNLOAD_MICROCODE = 0x92
WIN_FLUSH_CACHE = 0xe7
WIN_FLUSH_CACHE_EXT = 0xea
WIN_FORMAT = 0x50
WIN_GETMEDIASTATUS = 0xda
WIN_IDENTIFY = 0xec
WIN_IDENTIFY_DMA = 0xee
WIN_IDLEIMMEDIATE = 0xe1
WIN_INIT = 0x60
WIN_MEDIAEJECT = 0xed
WIN_MULTREAD = 0xc4
WIN_MULTREAD_EXT = 0x29
WIN_MULTWRITE = 0xc5
WIN_MULTWRITE_EXT = 0x39
WIN_NOP = 0x0
WIN_PACKETCMD = 0xa0
WIN_PIDENTIFY = 0xa1
WIN_POSTBOOT = 0xdc
WIN_PREBOOT = 0xdd
WIN_QUEUED_SERVICE = 0xa2
WIN_READ = 0x20
WIN_READDMA = 0xc8
WIN_READDMA_EXT = 0x25
WIN_READDMA_ONCE = 0xc9
WIN_READDMA_QUEUED = 0xc7
WIN_READDMA_QUEUED_EXT = 0x26
WIN_READ_BUFFER = 0xe4
WIN_READ_EXT = 0x24
WIN_READ_LONG = 0x22
WIN_READ_LONG_ONCE = 0x23
WIN_READ_NATIVE_MAX = 0xf8
WIN_READ_NATIVE_MAX_EXT = 0x27
WIN_READ_ONCE = 0x21
WIN_RECAL = 0x10
WIN_RESTORE = 0x10
WIN_SECURITY_DISABLE = 0xf6
WIN_SECURITY_ERASE_PREPARE = 0xf3
WIN_SECURITY_ERASE_UNIT = 0xf4
WIN_SECURITY_FREEZE_LOCK = 0xf5
WIN_SECURITY_SET_PASS = 0xf1
WIN_SECURITY_UNLOCK = 0xf2
WIN_SEEK = 0x70
WIN_SETFEATURES = 0xef
WIN_SETIDLE1 = 0xe3
WIN_SETIDLE2 = 0x97
WIN_SETMULT = 0xc6
WIN_SET_MAX = 0xf9
WIN_SET_MAX_EXT = 0x37
WIN_SLEEPNOW1 = 0xe6
WIN_SLEEPNOW2 = 0x99
WIN_SMART = 0xb0
WIN_SPECIFY = 0x91
WIN_SRST = 0x8
WIN_STANDBY = 0xe2
WIN_STANDBY2 = 0x96
WIN_STANDBYNOW1 = 0xe0
WIN_STANDBYNOW2 = 0x94
WIN_VERIFY = 0x40
WIN_VERIFY_EXT = 0x42
WIN_VERIFY_ONCE = 0x41
WIN_WRITE = 0x30
WIN_WRITEDMA = 0xca
WIN_WRITEDMA_EXT = 0x35
WIN_WRITEDMA_ONCE = 0xcb
WIN_WRITEDMA_QUEUED = 0xcc
WIN_WRITEDMA_QUEUED_EXT = 0x36
WIN_WRITE_BUFFER = 0xe8
WIN_WRITE_EXT = 0x34
WIN_WRITE_LONG = 0x32
WIN_WRITE_LONG_ONCE = 0x33
WIN_WRITE_ONCE = 0x31
WIN_WRITE_SAME = 0xe9
WIN_WRITE_VERIFY = 0x3c
WNOHANG = 0x1
WNOTHREAD = 0x20000000
WNOWAIT = 0x1000000

View File

@ -446,6 +446,7 @@ const (
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
EXABYTE_ENABLE_NEST = 0xf0
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000000
@ -543,6 +544,46 @@ const (
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HDIO_DRIVE_CMD = 0x31f
HDIO_DRIVE_CMD_AEB = 0x31e
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
HDIO_DRIVE_RESET = 0x31c
HDIO_DRIVE_TASK = 0x31e
HDIO_DRIVE_TASKFILE = 0x31d
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
HDIO_GETGEO = 0x301
HDIO_GET_32BIT = 0x309
HDIO_GET_ACOUSTIC = 0x30f
HDIO_GET_ADDRESS = 0x310
HDIO_GET_BUSSTATE = 0x31a
HDIO_GET_DMA = 0x30b
HDIO_GET_IDENTITY = 0x30d
HDIO_GET_KEEPSETTINGS = 0x308
HDIO_GET_MULTCOUNT = 0x304
HDIO_GET_NICE = 0x30c
HDIO_GET_NOWERR = 0x30a
HDIO_GET_QDMA = 0x305
HDIO_GET_UNMASKINTR = 0x302
HDIO_GET_WCACHE = 0x30e
HDIO_OBSOLETE_IDENTITY = 0x307
HDIO_SCAN_HWIF = 0x328
HDIO_SET_32BIT = 0x324
HDIO_SET_ACOUSTIC = 0x32c
HDIO_SET_ADDRESS = 0x32f
HDIO_SET_BUSSTATE = 0x32d
HDIO_SET_DMA = 0x326
HDIO_SET_KEEPSETTINGS = 0x323
HDIO_SET_MULTCOUNT = 0x321
HDIO_SET_NICE = 0x329
HDIO_SET_NOWERR = 0x325
HDIO_SET_PIO_MODE = 0x327
HDIO_SET_QDMA = 0x32e
HDIO_SET_UNMASKINTR = 0x322
HDIO_SET_WCACHE = 0x32b
HDIO_SET_XFER = 0x306
HDIO_TRISTATE_HWIF = 0x31b
HDIO_UNREGISTER_HWIF = 0x32a
HUPCL = 0x4000
IBSHIFT = 0x10
ICANON = 0x100
@ -1618,6 +1659,20 @@ const (
SIOCSPGRP = 0x8902
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SMART_AUTOSAVE = 0xd2
SMART_AUTO_OFFLINE = 0xdb
SMART_DISABLE = 0xd9
SMART_ENABLE = 0xd8
SMART_HCYL_PASS = 0xc2
SMART_IMMEDIATE_OFFLINE = 0xd4
SMART_LCYL_PASS = 0x4f
SMART_READ_LOG_SECTOR = 0xd5
SMART_READ_THRESHOLDS = 0xd1
SMART_READ_VALUES = 0xd0
SMART_SAVE = 0xd3
SMART_STATUS = 0xda
SMART_WRITE_LOG_SECTOR = 0xd6
SMART_WRITE_THRESHOLDS = 0xd7
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x2
@ -2006,6 +2061,86 @@ const (
WDIOC_SETPRETIMEOUT = 0xc0045708
WDIOC_SETTIMEOUT = 0xc0045706
WEXITED = 0x4
WIN_ACKMEDIACHANGE = 0xdb
WIN_CHECKPOWERMODE1 = 0xe5
WIN_CHECKPOWERMODE2 = 0x98
WIN_DEVICE_RESET = 0x8
WIN_DIAGNOSE = 0x90
WIN_DOORLOCK = 0xde
WIN_DOORUNLOCK = 0xdf
WIN_DOWNLOAD_MICROCODE = 0x92
WIN_FLUSH_CACHE = 0xe7
WIN_FLUSH_CACHE_EXT = 0xea
WIN_FORMAT = 0x50
WIN_GETMEDIASTATUS = 0xda
WIN_IDENTIFY = 0xec
WIN_IDENTIFY_DMA = 0xee
WIN_IDLEIMMEDIATE = 0xe1
WIN_INIT = 0x60
WIN_MEDIAEJECT = 0xed
WIN_MULTREAD = 0xc4
WIN_MULTREAD_EXT = 0x29
WIN_MULTWRITE = 0xc5
WIN_MULTWRITE_EXT = 0x39
WIN_NOP = 0x0
WIN_PACKETCMD = 0xa0
WIN_PIDENTIFY = 0xa1
WIN_POSTBOOT = 0xdc
WIN_PREBOOT = 0xdd
WIN_QUEUED_SERVICE = 0xa2
WIN_READ = 0x20
WIN_READDMA = 0xc8
WIN_READDMA_EXT = 0x25
WIN_READDMA_ONCE = 0xc9
WIN_READDMA_QUEUED = 0xc7
WIN_READDMA_QUEUED_EXT = 0x26
WIN_READ_BUFFER = 0xe4
WIN_READ_EXT = 0x24
WIN_READ_LONG = 0x22
WIN_READ_LONG_ONCE = 0x23
WIN_READ_NATIVE_MAX = 0xf8
WIN_READ_NATIVE_MAX_EXT = 0x27
WIN_READ_ONCE = 0x21
WIN_RECAL = 0x10
WIN_RESTORE = 0x10
WIN_SECURITY_DISABLE = 0xf6
WIN_SECURITY_ERASE_PREPARE = 0xf3
WIN_SECURITY_ERASE_UNIT = 0xf4
WIN_SECURITY_FREEZE_LOCK = 0xf5
WIN_SECURITY_SET_PASS = 0xf1
WIN_SECURITY_UNLOCK = 0xf2
WIN_SEEK = 0x70
WIN_SETFEATURES = 0xef
WIN_SETIDLE1 = 0xe3
WIN_SETIDLE2 = 0x97
WIN_SETMULT = 0xc6
WIN_SET_MAX = 0xf9
WIN_SET_MAX_EXT = 0x37
WIN_SLEEPNOW1 = 0xe6
WIN_SLEEPNOW2 = 0x99
WIN_SMART = 0xb0
WIN_SPECIFY = 0x91
WIN_SRST = 0x8
WIN_STANDBY = 0xe2
WIN_STANDBY2 = 0x96
WIN_STANDBYNOW1 = 0xe0
WIN_STANDBYNOW2 = 0x94
WIN_VERIFY = 0x40
WIN_VERIFY_EXT = 0x42
WIN_VERIFY_ONCE = 0x41
WIN_WRITE = 0x30
WIN_WRITEDMA = 0xca
WIN_WRITEDMA_EXT = 0x35
WIN_WRITEDMA_ONCE = 0xcb
WIN_WRITEDMA_QUEUED = 0xcc
WIN_WRITEDMA_QUEUED_EXT = 0x36
WIN_WRITE_BUFFER = 0xe8
WIN_WRITE_EXT = 0x34
WIN_WRITE_LONG = 0x32
WIN_WRITE_LONG_ONCE = 0x33
WIN_WRITE_ONCE = 0x31
WIN_WRITE_SAME = 0xe9
WIN_WRITE_VERIFY = 0x3c
WNOHANG = 0x1
WNOTHREAD = 0x20000000
WNOWAIT = 0x1000000

View File

@ -446,6 +446,7 @@ const (
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
EXABYTE_ENABLE_NEST = 0xf0
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
@ -543,6 +544,46 @@ const (
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HDIO_DRIVE_CMD = 0x31f
HDIO_DRIVE_CMD_AEB = 0x31e
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
HDIO_DRIVE_RESET = 0x31c
HDIO_DRIVE_TASK = 0x31e
HDIO_DRIVE_TASKFILE = 0x31d
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
HDIO_GETGEO = 0x301
HDIO_GET_32BIT = 0x309
HDIO_GET_ACOUSTIC = 0x30f
HDIO_GET_ADDRESS = 0x310
HDIO_GET_BUSSTATE = 0x31a
HDIO_GET_DMA = 0x30b
HDIO_GET_IDENTITY = 0x30d
HDIO_GET_KEEPSETTINGS = 0x308
HDIO_GET_MULTCOUNT = 0x304
HDIO_GET_NICE = 0x30c
HDIO_GET_NOWERR = 0x30a
HDIO_GET_QDMA = 0x305
HDIO_GET_UNMASKINTR = 0x302
HDIO_GET_WCACHE = 0x30e
HDIO_OBSOLETE_IDENTITY = 0x307
HDIO_SCAN_HWIF = 0x328
HDIO_SET_32BIT = 0x324
HDIO_SET_ACOUSTIC = 0x32c
HDIO_SET_ADDRESS = 0x32f
HDIO_SET_BUSSTATE = 0x32d
HDIO_SET_DMA = 0x326
HDIO_SET_KEEPSETTINGS = 0x323
HDIO_SET_MULTCOUNT = 0x321
HDIO_SET_NICE = 0x329
HDIO_SET_NOWERR = 0x325
HDIO_SET_PIO_MODE = 0x327
HDIO_SET_QDMA = 0x32e
HDIO_SET_UNMASKINTR = 0x322
HDIO_SET_WCACHE = 0x32b
HDIO_SET_XFER = 0x306
HDIO_TRISTATE_HWIF = 0x31b
HDIO_UNREGISTER_HWIF = 0x32a
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
@ -1622,6 +1663,20 @@ const (
SIOCSPGRP = 0x8902
SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a
SMART_AUTOSAVE = 0xd2
SMART_AUTO_OFFLINE = 0xdb
SMART_DISABLE = 0xd9
SMART_ENABLE = 0xd8
SMART_HCYL_PASS = 0xc2
SMART_IMMEDIATE_OFFLINE = 0xd4
SMART_LCYL_PASS = 0x4f
SMART_READ_LOG_SECTOR = 0xd5
SMART_READ_THRESHOLDS = 0xd1
SMART_READ_VALUES = 0xd0
SMART_SAVE = 0xd3
SMART_STATUS = 0xda
SMART_WRITE_LOG_SECTOR = 0xd6
SMART_WRITE_THRESHOLDS = 0xd7
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x2
@ -2006,6 +2061,86 @@ const (
WDIOC_SETPRETIMEOUT = 0xc0045708
WDIOC_SETTIMEOUT = 0xc0045706
WEXITED = 0x4
WIN_ACKMEDIACHANGE = 0xdb
WIN_CHECKPOWERMODE1 = 0xe5
WIN_CHECKPOWERMODE2 = 0x98
WIN_DEVICE_RESET = 0x8
WIN_DIAGNOSE = 0x90
WIN_DOORLOCK = 0xde
WIN_DOORUNLOCK = 0xdf
WIN_DOWNLOAD_MICROCODE = 0x92
WIN_FLUSH_CACHE = 0xe7
WIN_FLUSH_CACHE_EXT = 0xea
WIN_FORMAT = 0x50
WIN_GETMEDIASTATUS = 0xda
WIN_IDENTIFY = 0xec
WIN_IDENTIFY_DMA = 0xee
WIN_IDLEIMMEDIATE = 0xe1
WIN_INIT = 0x60
WIN_MEDIAEJECT = 0xed
WIN_MULTREAD = 0xc4
WIN_MULTREAD_EXT = 0x29
WIN_MULTWRITE = 0xc5
WIN_MULTWRITE_EXT = 0x39
WIN_NOP = 0x0
WIN_PACKETCMD = 0xa0
WIN_PIDENTIFY = 0xa1
WIN_POSTBOOT = 0xdc
WIN_PREBOOT = 0xdd
WIN_QUEUED_SERVICE = 0xa2
WIN_READ = 0x20
WIN_READDMA = 0xc8
WIN_READDMA_EXT = 0x25
WIN_READDMA_ONCE = 0xc9
WIN_READDMA_QUEUED = 0xc7
WIN_READDMA_QUEUED_EXT = 0x26
WIN_READ_BUFFER = 0xe4
WIN_READ_EXT = 0x24
WIN_READ_LONG = 0x22
WIN_READ_LONG_ONCE = 0x23
WIN_READ_NATIVE_MAX = 0xf8
WIN_READ_NATIVE_MAX_EXT = 0x27
WIN_READ_ONCE = 0x21
WIN_RECAL = 0x10
WIN_RESTORE = 0x10
WIN_SECURITY_DISABLE = 0xf6
WIN_SECURITY_ERASE_PREPARE = 0xf3
WIN_SECURITY_ERASE_UNIT = 0xf4
WIN_SECURITY_FREEZE_LOCK = 0xf5
WIN_SECURITY_SET_PASS = 0xf1
WIN_SECURITY_UNLOCK = 0xf2
WIN_SEEK = 0x70
WIN_SETFEATURES = 0xef
WIN_SETIDLE1 = 0xe3
WIN_SETIDLE2 = 0x97
WIN_SETMULT = 0xc6
WIN_SET_MAX = 0xf9
WIN_SET_MAX_EXT = 0x37
WIN_SLEEPNOW1 = 0xe6
WIN_SLEEPNOW2 = 0x99
WIN_SMART = 0xb0
WIN_SPECIFY = 0x91
WIN_SRST = 0x8
WIN_STANDBY = 0xe2
WIN_STANDBY2 = 0x96
WIN_STANDBYNOW1 = 0xe0
WIN_STANDBYNOW2 = 0x94
WIN_VERIFY = 0x40
WIN_VERIFY_EXT = 0x42
WIN_VERIFY_ONCE = 0x41
WIN_WRITE = 0x30
WIN_WRITEDMA = 0xca
WIN_WRITEDMA_EXT = 0x35
WIN_WRITEDMA_ONCE = 0xcb
WIN_WRITEDMA_QUEUED = 0xcc
WIN_WRITEDMA_QUEUED_EXT = 0x36
WIN_WRITE_BUFFER = 0xe8
WIN_WRITE_EXT = 0x34
WIN_WRITE_LONG = 0x32
WIN_WRITE_LONG_ONCE = 0x33
WIN_WRITE_ONCE = 0x31
WIN_WRITE_SAME = 0xe9
WIN_WRITE_VERIFY = 0x3c
WNOHANG = 0x1
WNOTHREAD = 0x20000000
WNOWAIT = 0x1000000

View File

@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PivotRoot(newroot string, putold string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(newroot)

View File

@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PivotRoot(newroot string, putold string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(newroot)

View File

@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PivotRoot(newroot string, putold string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(newroot)

View File

@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PivotRoot(newroot string, putold string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(newroot)

View File

@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PivotRoot(newroot string, putold string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(newroot)

View File

@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PivotRoot(newroot string, putold string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(newroot)

View File

@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PivotRoot(newroot string, putold string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(newroot)

View File

@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PivotRoot(newroot string, putold string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(newroot)

View File

@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PivotRoot(newroot string, putold string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(newroot)

View File

@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PivotRoot(newroot string, putold string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(newroot)

View File

@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PivotRoot(newroot string, putold string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(newroot)

View File

@ -780,6 +780,17 @@ func Getrlimit(which int, lim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrtable() (rtable int, err error) {
r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
rtable = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrusage(who int, rusage *Rusage) (err error) {
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
@ -1254,6 +1265,16 @@ func Setrlimit(which int, lim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrtable(rtable int) (err error) {
_, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)

View File

@ -780,6 +780,17 @@ func Getrlimit(which int, lim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrtable() (rtable int, err error) {
r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
rtable = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrusage(who int, rusage *Rusage) (err error) {
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
@ -1254,6 +1265,16 @@ func Setrlimit(which int, lim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrtable(rtable int) (err error) {
_, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)

View File

@ -780,6 +780,17 @@ func Getrlimit(which int, lim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrtable() (rtable int, err error) {
r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
rtable = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrusage(who int, rusage *Rusage) (err error) {
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
@ -1254,6 +1265,16 @@ func Setrlimit(which int, lim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrtable(rtable int) (err error) {
_, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)

View File

@ -96,24 +96,24 @@ type Rlimit struct {
type _Gid_t uint32
type Stat_t struct {
Dev uint64
X__pad1 uint16
_ [2]byte
X__st_ino uint32
Mode uint32
Nlink uint32
Uid uint32
Gid uint32
Rdev uint64
X__pad2 uint16
_ [2]byte
Size int64
Blksize int32
Blocks int64
Atim Timespec
Mtim Timespec
Ctim Timespec
Ino uint64
Dev uint64
_ uint16
_ [2]byte
_ uint32
Mode uint32
Nlink uint32
Uid uint32
Gid uint32
Rdev uint64
_ uint16
_ [2]byte
Size int64
Blksize int32
Blocks int64
Atim Timespec
Mtim Timespec
Ctim Timespec
Ino uint64
}
type Statfs_t struct {
@ -132,9 +132,9 @@ type Statfs_t struct {
}
type StatxTimestamp struct {
Sec int64
Nsec uint32
X__reserved int32
Sec int64
Nsec uint32
_ int32
}
type Statx_t struct {
@ -171,7 +171,7 @@ type Dirent struct {
}
type Fsid struct {
X__val [2]int32
Val [2]int32
}
type Flock_t struct {
@ -583,12 +583,12 @@ type RtAttr struct {
}
type IfInfomsg struct {
Family uint8
X__ifi_pad uint8
Type uint16
Index int32
Flags uint32
Change uint32
Family uint8
_ uint8
Type uint16
Index int32
Flags uint32
Change uint32
}
type IfAddrmsg struct {
@ -683,7 +683,7 @@ type Sysinfo_t struct {
Totalhigh uint32
Freehigh uint32
Unit uint32
X_f [8]int8
_ [8]int8
}
type Utsname struct {
@ -739,7 +739,7 @@ const (
)
type Sigset_t struct {
X__val [32]uint32
Val [32]uint32
}
const RNDGETENTCNT = 0x80045200
@ -896,6 +896,177 @@ const (
BDADDR_LE_RANDOM = 0x2
)
type PerfEventAttr struct {
Type uint32
Size uint32
Config uint64
Sample uint64
Sample_type uint64
Read_format uint64
Bits uint64
Wakeup uint32
Bp_type uint32
Ext1 uint64
Ext2 uint64
Branch_sample_type uint64
Sample_regs_user uint64
Sample_stack_user uint32
Clockid int32
Sample_regs_intr uint64
Aux_watermark uint32
_ uint32
}
type PerfEventMmapPage struct {
Version uint32
Compat_version uint32
Lock uint32
Index uint32
Offset int64
Time_enabled uint64
Time_running uint64
Capabilities uint64
Pmc_width uint16
Time_shift uint16
Time_mult uint32
Time_offset uint64
Time_zero uint64
Size uint32
_ [948]uint8
Data_head uint64
Data_tail uint64
Data_offset uint64
Data_size uint64
Aux_head uint64
Aux_tail uint64
Aux_offset uint64
Aux_size uint64
}
const (
PerfBitDisabled uint64 = CBitFieldMaskBit0
PerfBitInherit = CBitFieldMaskBit1
PerfBitPinned = CBitFieldMaskBit2
PerfBitExclusive = CBitFieldMaskBit3
PerfBitExcludeUser = CBitFieldMaskBit4
PerfBitExcludeKernel = CBitFieldMaskBit5
PerfBitExcludeHv = CBitFieldMaskBit6
PerfBitExcludeIdle = CBitFieldMaskBit7
PerfBitMmap = CBitFieldMaskBit8
PerfBitComm = CBitFieldMaskBit9
PerfBitFreq = CBitFieldMaskBit10
PerfBitInheritStat = CBitFieldMaskBit11
PerfBitEnableOnExec = CBitFieldMaskBit12
PerfBitTask = CBitFieldMaskBit13
PerfBitWatermark = CBitFieldMaskBit14
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
PerfBitMmapData = CBitFieldMaskBit17
PerfBitSampleIDAll = CBitFieldMaskBit18
PerfBitExcludeHost = CBitFieldMaskBit19
PerfBitExcludeGuest = CBitFieldMaskBit20
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
PerfBitMmap2 = CBitFieldMaskBit23
PerfBitCommExec = CBitFieldMaskBit24
PerfBitUseClockID = CBitFieldMaskBit25
PerfBitContextSwitch = CBitFieldMaskBit26
)
const (
PERF_TYPE_HARDWARE = 0x0
PERF_TYPE_SOFTWARE = 0x1
PERF_TYPE_TRACEPOINT = 0x2
PERF_TYPE_HW_CACHE = 0x3
PERF_TYPE_RAW = 0x4
PERF_TYPE_BREAKPOINT = 0x5
PERF_COUNT_HW_CPU_CYCLES = 0x0
PERF_COUNT_HW_INSTRUCTIONS = 0x1
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
PERF_COUNT_HW_CACHE_MISSES = 0x3
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
PERF_COUNT_HW_BRANCH_MISSES = 0x5
PERF_COUNT_HW_BUS_CYCLES = 0x6
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
PERF_COUNT_HW_CACHE_L1D = 0x0
PERF_COUNT_HW_CACHE_L1I = 0x1
PERF_COUNT_HW_CACHE_LL = 0x2
PERF_COUNT_HW_CACHE_DTLB = 0x3
PERF_COUNT_HW_CACHE_ITLB = 0x4
PERF_COUNT_HW_CACHE_BPU = 0x5
PERF_COUNT_HW_CACHE_NODE = 0x6
PERF_COUNT_HW_CACHE_OP_READ = 0x0
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
PERF_COUNT_SW_CPU_CLOCK = 0x0
PERF_COUNT_SW_TASK_CLOCK = 0x1
PERF_COUNT_SW_PAGE_FAULTS = 0x2
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9
PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2
PERF_SAMPLE_TIME = 0x4
PERF_SAMPLE_ADDR = 0x8
PERF_SAMPLE_READ = 0x10
PERF_SAMPLE_CALLCHAIN = 0x20
PERF_SAMPLE_ID = 0x40
PERF_SAMPLE_CPU = 0x80
PERF_SAMPLE_PERIOD = 0x100
PERF_SAMPLE_STREAM_ID = 0x200
PERF_SAMPLE_RAW = 0x400
PERF_SAMPLE_BRANCH_STACK = 0x800
PERF_SAMPLE_BRANCH_USER = 0x1
PERF_SAMPLE_BRANCH_KERNEL = 0x2
PERF_SAMPLE_BRANCH_HV = 0x4
PERF_SAMPLE_BRANCH_ANY = 0x8
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9
PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80
PERF_CONTEXT_USER = -0x200
PERF_CONTEXT_GUEST = -0x800
PERF_CONTEXT_GUEST_KERNEL = -0x880
PERF_CONTEXT_GUEST_USER = -0xa00
PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4
)
const (
CBitFieldMaskBit0 = 0x1
CBitFieldMaskBit1 = 0x2
@ -962,3 +1133,114 @@ const (
CBitFieldMaskBit62 = 0x4000000000000000
CBitFieldMaskBit63 = 0x8000000000000000
)
type SockaddrStorage struct {
Family uint16
_ [122]int8
_ uint32
}
type TCPMD5Sig struct {
Addr SockaddrStorage
Flags uint8
Prefixlen uint8
Keylen uint16
_ uint32
Key [80]uint8
}
type HDDriveCmdHdr struct {
Command uint8
Number uint8
Feature uint8
Count uint8
}
type HDGeometry struct {
Heads uint8
Sectors uint8
Cylinders uint16
Start uint32
}
type HDDriveID struct {
Config uint16
Cyls uint16
Reserved2 uint16
Heads uint16
Track_bytes uint16
Sector_bytes uint16
Sectors uint16
Vendor0 uint16
Vendor1 uint16
Vendor2 uint16
Serial_no [20]uint8
Buf_type uint16
Buf_size uint16
Ecc_bytes uint16
Fw_rev [8]uint8
Model [40]uint8
Max_multsect uint8
Vendor3 uint8
Dword_io uint16
Vendor4 uint8
Capability uint8
Reserved50 uint16
Vendor5 uint8
TPIO uint8
Vendor6 uint8
TDMA uint8
Field_valid uint16
Cur_cyls uint16
Cur_heads uint16
Cur_sectors uint16
Cur_capacity0 uint16
Cur_capacity1 uint16
Multsect uint8
Multsect_valid uint8
Lba_capacity uint32
Dma_1word uint16
Dma_mword uint16
Eide_pio_modes uint16
Eide_dma_min uint16
Eide_dma_time uint16
Eide_pio uint16
Eide_pio_iordy uint16
Words69_70 [2]uint16
Words71_74 [4]uint16
Queue_depth uint16
Words76_79 [4]uint16
Major_rev_num uint16
Minor_rev_num uint16
Command_set_1 uint16
Command_set_2 uint16
Cfsse uint16
Cfs_enable_1 uint16
Cfs_enable_2 uint16
Csf_default uint16
Dma_ultra uint16
Trseuc uint16
TrsEuc uint16
CurAPMvalues uint16
Mprc uint16
Hw_config uint16
Acoustic uint16
Msrqs uint16
Sxfert uint16
Sal uint16
Spg uint32
Lba_capacity_2 uint64
Words104_125 [22]uint16
Last_lun uint16
Word127 uint16
Dlf uint16
Csfo uint16
Words130_155 [26]uint16
Word156 uint16
Words157_159 [3]uint16
Cfa_power uint16
Words161_175 [15]uint16
Words176_205 [30]uint16
Words206_254 [49]uint16
Integrity_word uint16
}

View File

@ -105,7 +105,7 @@ type Stat_t struct {
Mode uint32
Uid uint32
Gid uint32
X__pad0 int32
_ int32
Rdev uint64
Size int64
Blksize int64
@ -132,9 +132,9 @@ type Statfs_t struct {
}
type StatxTimestamp struct {
Sec int64
Nsec uint32
X__reserved int32
Sec int64
Nsec uint32
_ int32
}
type Statx_t struct {
@ -171,7 +171,7 @@ type Dirent struct {
}
type Fsid struct {
X__val [2]int32
Val [2]int32
}
type Flock_t struct {
@ -587,12 +587,12 @@ type RtAttr struct {
}
type IfInfomsg struct {
Family uint8
X__ifi_pad uint8
Type uint16
Index int32
Flags uint32
Change uint32
Family uint8
_ uint8
Type uint16
Index int32
Flags uint32
Change uint32
}
type IfAddrmsg struct {
@ -698,7 +698,7 @@ type Sysinfo_t struct {
Totalhigh uint64
Freehigh uint64
Unit uint32
X_f [0]int8
_ [0]int8
_ [4]byte
}
@ -757,7 +757,7 @@ const (
)
type Sigset_t struct {
X__val [16]uint64
Val [16]uint64
}
const RNDGETENTCNT = 0x80045200
@ -914,6 +914,177 @@ const (
BDADDR_LE_RANDOM = 0x2
)
type PerfEventAttr struct {
Type uint32
Size uint32
Config uint64
Sample uint64
Sample_type uint64
Read_format uint64
Bits uint64
Wakeup uint32
Bp_type uint32
Ext1 uint64
Ext2 uint64
Branch_sample_type uint64
Sample_regs_user uint64
Sample_stack_user uint32
Clockid int32
Sample_regs_intr uint64
Aux_watermark uint32
_ uint32
}
type PerfEventMmapPage struct {
Version uint32
Compat_version uint32
Lock uint32
Index uint32
Offset int64
Time_enabled uint64
Time_running uint64
Capabilities uint64
Pmc_width uint16
Time_shift uint16
Time_mult uint32
Time_offset uint64
Time_zero uint64
Size uint32
_ [948]uint8
Data_head uint64
Data_tail uint64
Data_offset uint64
Data_size uint64
Aux_head uint64
Aux_tail uint64
Aux_offset uint64
Aux_size uint64
}
const (
PerfBitDisabled uint64 = CBitFieldMaskBit0
PerfBitInherit = CBitFieldMaskBit1
PerfBitPinned = CBitFieldMaskBit2
PerfBitExclusive = CBitFieldMaskBit3
PerfBitExcludeUser = CBitFieldMaskBit4
PerfBitExcludeKernel = CBitFieldMaskBit5
PerfBitExcludeHv = CBitFieldMaskBit6
PerfBitExcludeIdle = CBitFieldMaskBit7
PerfBitMmap = CBitFieldMaskBit8
PerfBitComm = CBitFieldMaskBit9
PerfBitFreq = CBitFieldMaskBit10
PerfBitInheritStat = CBitFieldMaskBit11
PerfBitEnableOnExec = CBitFieldMaskBit12
PerfBitTask = CBitFieldMaskBit13
PerfBitWatermark = CBitFieldMaskBit14
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
PerfBitMmapData = CBitFieldMaskBit17
PerfBitSampleIDAll = CBitFieldMaskBit18
PerfBitExcludeHost = CBitFieldMaskBit19
PerfBitExcludeGuest = CBitFieldMaskBit20
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
PerfBitMmap2 = CBitFieldMaskBit23
PerfBitCommExec = CBitFieldMaskBit24
PerfBitUseClockID = CBitFieldMaskBit25
PerfBitContextSwitch = CBitFieldMaskBit26
)
const (
PERF_TYPE_HARDWARE = 0x0
PERF_TYPE_SOFTWARE = 0x1
PERF_TYPE_TRACEPOINT = 0x2
PERF_TYPE_HW_CACHE = 0x3
PERF_TYPE_RAW = 0x4
PERF_TYPE_BREAKPOINT = 0x5
PERF_COUNT_HW_CPU_CYCLES = 0x0
PERF_COUNT_HW_INSTRUCTIONS = 0x1
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
PERF_COUNT_HW_CACHE_MISSES = 0x3
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
PERF_COUNT_HW_BRANCH_MISSES = 0x5
PERF_COUNT_HW_BUS_CYCLES = 0x6
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
PERF_COUNT_HW_CACHE_L1D = 0x0
PERF_COUNT_HW_CACHE_L1I = 0x1
PERF_COUNT_HW_CACHE_LL = 0x2
PERF_COUNT_HW_CACHE_DTLB = 0x3
PERF_COUNT_HW_CACHE_ITLB = 0x4
PERF_COUNT_HW_CACHE_BPU = 0x5
PERF_COUNT_HW_CACHE_NODE = 0x6
PERF_COUNT_HW_CACHE_OP_READ = 0x0
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
PERF_COUNT_SW_CPU_CLOCK = 0x0
PERF_COUNT_SW_TASK_CLOCK = 0x1
PERF_COUNT_SW_PAGE_FAULTS = 0x2
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9
PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2
PERF_SAMPLE_TIME = 0x4
PERF_SAMPLE_ADDR = 0x8
PERF_SAMPLE_READ = 0x10
PERF_SAMPLE_CALLCHAIN = 0x20
PERF_SAMPLE_ID = 0x40
PERF_SAMPLE_CPU = 0x80
PERF_SAMPLE_PERIOD = 0x100
PERF_SAMPLE_STREAM_ID = 0x200
PERF_SAMPLE_RAW = 0x400
PERF_SAMPLE_BRANCH_STACK = 0x800
PERF_SAMPLE_BRANCH_USER = 0x1
PERF_SAMPLE_BRANCH_KERNEL = 0x2
PERF_SAMPLE_BRANCH_HV = 0x4
PERF_SAMPLE_BRANCH_ANY = 0x8
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9
PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80
PERF_CONTEXT_USER = -0x200
PERF_CONTEXT_GUEST = -0x800
PERF_CONTEXT_GUEST_KERNEL = -0x880
PERF_CONTEXT_GUEST_USER = -0xa00
PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4
)
const (
CBitFieldMaskBit0 = 0x1
CBitFieldMaskBit1 = 0x2
@ -980,3 +1151,115 @@ const (
CBitFieldMaskBit62 = 0x4000000000000000
CBitFieldMaskBit63 = 0x8000000000000000
)
type SockaddrStorage struct {
Family uint16
_ [118]int8
_ uint64
}
type TCPMD5Sig struct {
Addr SockaddrStorage
Flags uint8
Prefixlen uint8
Keylen uint16
_ uint32
Key [80]uint8
}
type HDDriveCmdHdr struct {
Command uint8
Number uint8
Feature uint8
Count uint8
}
type HDGeometry struct {
Heads uint8
Sectors uint8
Cylinders uint16
_ [4]byte
Start uint64
}
type HDDriveID struct {
Config uint16
Cyls uint16
Reserved2 uint16
Heads uint16
Track_bytes uint16
Sector_bytes uint16
Sectors uint16
Vendor0 uint16
Vendor1 uint16
Vendor2 uint16
Serial_no [20]uint8
Buf_type uint16
Buf_size uint16
Ecc_bytes uint16
Fw_rev [8]uint8
Model [40]uint8
Max_multsect uint8
Vendor3 uint8
Dword_io uint16
Vendor4 uint8
Capability uint8
Reserved50 uint16
Vendor5 uint8
TPIO uint8
Vendor6 uint8
TDMA uint8
Field_valid uint16
Cur_cyls uint16
Cur_heads uint16
Cur_sectors uint16
Cur_capacity0 uint16
Cur_capacity1 uint16
Multsect uint8
Multsect_valid uint8
Lba_capacity uint32
Dma_1word uint16
Dma_mword uint16
Eide_pio_modes uint16
Eide_dma_min uint16
Eide_dma_time uint16
Eide_pio uint16
Eide_pio_iordy uint16
Words69_70 [2]uint16
Words71_74 [4]uint16
Queue_depth uint16
Words76_79 [4]uint16
Major_rev_num uint16
Minor_rev_num uint16
Command_set_1 uint16
Command_set_2 uint16
Cfsse uint16
Cfs_enable_1 uint16
Cfs_enable_2 uint16
Csf_default uint16
Dma_ultra uint16
Trseuc uint16
TrsEuc uint16
CurAPMvalues uint16
Mprc uint16
Hw_config uint16
Acoustic uint16
Msrqs uint16
Sxfert uint16
Sal uint16
Spg uint32
Lba_capacity_2 uint64
Words104_125 [22]uint16
Last_lun uint16
Word127 uint16
Dlf uint16
Csfo uint16
Words130_155 [26]uint16
Word156 uint16
Words157_159 [3]uint16
Cfa_power uint16
Words161_175 [15]uint16
Words176_205 [30]uint16
Words206_254 [49]uint16
Integrity_word uint16
}

View File

@ -96,25 +96,25 @@ type Rlimit struct {
type _Gid_t uint32
type Stat_t struct {
Dev uint64
X__pad1 uint16
_ [2]byte
X__st_ino uint32
Mode uint32
Nlink uint32
Uid uint32
Gid uint32
Rdev uint64
X__pad2 uint16
_ [6]byte
Size int64
Blksize int32
_ [4]byte
Blocks int64
Atim Timespec
Mtim Timespec
Ctim Timespec
Ino uint64
Dev uint64
_ uint16
_ [2]byte
_ uint32
Mode uint32
Nlink uint32
Uid uint32
Gid uint32
Rdev uint64
_ uint16
_ [6]byte
Size int64
Blksize int32
_ [4]byte
Blocks int64
Atim Timespec
Mtim Timespec
Ctim Timespec
Ino uint64
}
type Statfs_t struct {
@ -134,9 +134,9 @@ type Statfs_t struct {
}
type StatxTimestamp struct {
Sec int64
Nsec uint32
X__reserved int32
Sec int64
Nsec uint32
_ int32
}
type Statx_t struct {
@ -173,7 +173,7 @@ type Dirent struct {
}
type Fsid struct {
X__val [2]int32
Val [2]int32
}
type Flock_t struct {
@ -587,12 +587,12 @@ type RtAttr struct {
}
type IfInfomsg struct {
Family uint8
X__ifi_pad uint8
Type uint16
Index int32
Flags uint32
Change uint32
Family uint8
_ uint8
Type uint16
Index int32
Flags uint32
Change uint32
}
type IfAddrmsg struct {
@ -671,7 +671,7 @@ type Sysinfo_t struct {
Totalhigh uint32
Freehigh uint32
Unit uint32
X_f [8]uint8
_ [8]uint8
}
type Utsname struct {
@ -728,7 +728,7 @@ const (
)
type Sigset_t struct {
X__val [32]uint32
Val [32]uint32
}
const RNDGETENTCNT = 0x80045200
@ -885,6 +885,177 @@ const (
BDADDR_LE_RANDOM = 0x2
)
type PerfEventAttr struct {
Type uint32
Size uint32
Config uint64
Sample uint64
Sample_type uint64
Read_format uint64
Bits uint64
Wakeup uint32
Bp_type uint32
Ext1 uint64
Ext2 uint64
Branch_sample_type uint64
Sample_regs_user uint64
Sample_stack_user uint32
Clockid int32
Sample_regs_intr uint64
Aux_watermark uint32
_ uint32
}
type PerfEventMmapPage struct {
Version uint32
Compat_version uint32
Lock uint32
Index uint32
Offset int64
Time_enabled uint64
Time_running uint64
Capabilities uint64
Pmc_width uint16
Time_shift uint16
Time_mult uint32
Time_offset uint64
Time_zero uint64
Size uint32
_ [948]uint8
Data_head uint64
Data_tail uint64
Data_offset uint64
Data_size uint64
Aux_head uint64
Aux_tail uint64
Aux_offset uint64
Aux_size uint64
}
const (
PerfBitDisabled uint64 = CBitFieldMaskBit0
PerfBitInherit = CBitFieldMaskBit1
PerfBitPinned = CBitFieldMaskBit2
PerfBitExclusive = CBitFieldMaskBit3
PerfBitExcludeUser = CBitFieldMaskBit4
PerfBitExcludeKernel = CBitFieldMaskBit5
PerfBitExcludeHv = CBitFieldMaskBit6
PerfBitExcludeIdle = CBitFieldMaskBit7
PerfBitMmap = CBitFieldMaskBit8
PerfBitComm = CBitFieldMaskBit9
PerfBitFreq = CBitFieldMaskBit10
PerfBitInheritStat = CBitFieldMaskBit11
PerfBitEnableOnExec = CBitFieldMaskBit12
PerfBitTask = CBitFieldMaskBit13
PerfBitWatermark = CBitFieldMaskBit14
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
PerfBitMmapData = CBitFieldMaskBit17
PerfBitSampleIDAll = CBitFieldMaskBit18
PerfBitExcludeHost = CBitFieldMaskBit19
PerfBitExcludeGuest = CBitFieldMaskBit20
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
PerfBitMmap2 = CBitFieldMaskBit23
PerfBitCommExec = CBitFieldMaskBit24
PerfBitUseClockID = CBitFieldMaskBit25
PerfBitContextSwitch = CBitFieldMaskBit26
)
const (
PERF_TYPE_HARDWARE = 0x0
PERF_TYPE_SOFTWARE = 0x1
PERF_TYPE_TRACEPOINT = 0x2
PERF_TYPE_HW_CACHE = 0x3
PERF_TYPE_RAW = 0x4
PERF_TYPE_BREAKPOINT = 0x5
PERF_COUNT_HW_CPU_CYCLES = 0x0
PERF_COUNT_HW_INSTRUCTIONS = 0x1
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
PERF_COUNT_HW_CACHE_MISSES = 0x3
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
PERF_COUNT_HW_BRANCH_MISSES = 0x5
PERF_COUNT_HW_BUS_CYCLES = 0x6
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
PERF_COUNT_HW_CACHE_L1D = 0x0
PERF_COUNT_HW_CACHE_L1I = 0x1
PERF_COUNT_HW_CACHE_LL = 0x2
PERF_COUNT_HW_CACHE_DTLB = 0x3
PERF_COUNT_HW_CACHE_ITLB = 0x4
PERF_COUNT_HW_CACHE_BPU = 0x5
PERF_COUNT_HW_CACHE_NODE = 0x6
PERF_COUNT_HW_CACHE_OP_READ = 0x0
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
PERF_COUNT_SW_CPU_CLOCK = 0x0
PERF_COUNT_SW_TASK_CLOCK = 0x1
PERF_COUNT_SW_PAGE_FAULTS = 0x2
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9
PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2
PERF_SAMPLE_TIME = 0x4
PERF_SAMPLE_ADDR = 0x8
PERF_SAMPLE_READ = 0x10
PERF_SAMPLE_CALLCHAIN = 0x20
PERF_SAMPLE_ID = 0x40
PERF_SAMPLE_CPU = 0x80
PERF_SAMPLE_PERIOD = 0x100
PERF_SAMPLE_STREAM_ID = 0x200
PERF_SAMPLE_RAW = 0x400
PERF_SAMPLE_BRANCH_STACK = 0x800
PERF_SAMPLE_BRANCH_USER = 0x1
PERF_SAMPLE_BRANCH_KERNEL = 0x2
PERF_SAMPLE_BRANCH_HV = 0x4
PERF_SAMPLE_BRANCH_ANY = 0x8
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9
PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80
PERF_CONTEXT_USER = -0x200
PERF_CONTEXT_GUEST = -0x800
PERF_CONTEXT_GUEST_KERNEL = -0x880
PERF_CONTEXT_GUEST_USER = -0xa00
PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4
)
const (
CBitFieldMaskBit0 = 0x1
CBitFieldMaskBit1 = 0x2
@ -951,3 +1122,114 @@ const (
CBitFieldMaskBit62 = 0x4000000000000000
CBitFieldMaskBit63 = 0x8000000000000000
)
type SockaddrStorage struct {
Family uint16
_ [122]uint8
_ uint32
}
type TCPMD5Sig struct {
Addr SockaddrStorage
Flags uint8
Prefixlen uint8
Keylen uint16
_ uint32
Key [80]uint8
}
type HDDriveCmdHdr struct {
Command uint8
Number uint8
Feature uint8
Count uint8
}
type HDGeometry struct {
Heads uint8
Sectors uint8
Cylinders uint16
Start uint32
}
type HDDriveID struct {
Config uint16
Cyls uint16
Reserved2 uint16
Heads uint16
Track_bytes uint16
Sector_bytes uint16
Sectors uint16
Vendor0 uint16
Vendor1 uint16
Vendor2 uint16
Serial_no [20]uint8
Buf_type uint16
Buf_size uint16
Ecc_bytes uint16
Fw_rev [8]uint8
Model [40]uint8
Max_multsect uint8
Vendor3 uint8
Dword_io uint16
Vendor4 uint8
Capability uint8
Reserved50 uint16
Vendor5 uint8
TPIO uint8
Vendor6 uint8
TDMA uint8
Field_valid uint16
Cur_cyls uint16
Cur_heads uint16
Cur_sectors uint16
Cur_capacity0 uint16
Cur_capacity1 uint16
Multsect uint8
Multsect_valid uint8
Lba_capacity uint32
Dma_1word uint16
Dma_mword uint16
Eide_pio_modes uint16
Eide_dma_min uint16
Eide_dma_time uint16
Eide_pio uint16
Eide_pio_iordy uint16
Words69_70 [2]uint16
Words71_74 [4]uint16
Queue_depth uint16
Words76_79 [4]uint16
Major_rev_num uint16
Minor_rev_num uint16
Command_set_1 uint16
Command_set_2 uint16
Cfsse uint16
Cfs_enable_1 uint16
Cfs_enable_2 uint16
Csf_default uint16
Dma_ultra uint16
Trseuc uint16
TrsEuc uint16
CurAPMvalues uint16
Mprc uint16
Hw_config uint16
Acoustic uint16
Msrqs uint16
Sxfert uint16
Sal uint16
Spg uint32
Lba_capacity_2 uint64
Words104_125 [22]uint16
Last_lun uint16
Word127 uint16
Dlf uint16
Csfo uint16
Words130_155 [26]uint16
Word156 uint16
Words157_159 [3]uint16
Cfa_power uint16
Words161_175 [15]uint16
Words176_205 [30]uint16
Words206_254 [49]uint16
Integrity_word uint16
}

View File

@ -106,10 +106,10 @@ type Stat_t struct {
Uid uint32
Gid uint32
Rdev uint64
X__pad1 uint64
_ uint64
Size int64
Blksize int32
X__pad2 int32
_ int32
Blocks int64
Atim Timespec
Mtim Timespec
@ -133,9 +133,9 @@ type Statfs_t struct {
}
type StatxTimestamp struct {
Sec int64
Nsec uint32
X__reserved int32
Sec int64
Nsec uint32
_ int32
}
type Statx_t struct {
@ -172,7 +172,7 @@ type Dirent struct {
}
type Fsid struct {
X__val [2]int32
Val [2]int32
}
type Flock_t struct {
@ -588,12 +588,12 @@ type RtAttr struct {
}
type IfInfomsg struct {
Family uint8
X__ifi_pad uint8
Type uint16
Index int32
Flags uint32
Change uint32
Family uint8
_ uint8
Type uint16
Index int32
Flags uint32
Change uint32
}
type IfAddrmsg struct {
@ -676,7 +676,7 @@ type Sysinfo_t struct {
Totalhigh uint64
Freehigh uint64
Unit uint32
X_f [0]int8
_ [0]int8
_ [4]byte
}
@ -736,7 +736,7 @@ const (
)
type Sigset_t struct {
X__val [16]uint64
Val [16]uint64
}
const RNDGETENTCNT = 0x80045200
@ -893,6 +893,177 @@ const (
BDADDR_LE_RANDOM = 0x2
)
type PerfEventAttr struct {
Type uint32
Size uint32
Config uint64
Sample uint64
Sample_type uint64
Read_format uint64
Bits uint64
Wakeup uint32
Bp_type uint32
Ext1 uint64
Ext2 uint64
Branch_sample_type uint64
Sample_regs_user uint64
Sample_stack_user uint32
Clockid int32
Sample_regs_intr uint64
Aux_watermark uint32
_ uint32
}
type PerfEventMmapPage struct {
Version uint32
Compat_version uint32
Lock uint32
Index uint32
Offset int64
Time_enabled uint64
Time_running uint64
Capabilities uint64
Pmc_width uint16
Time_shift uint16
Time_mult uint32
Time_offset uint64
Time_zero uint64
Size uint32
_ [948]uint8
Data_head uint64
Data_tail uint64
Data_offset uint64
Data_size uint64
Aux_head uint64
Aux_tail uint64
Aux_offset uint64
Aux_size uint64
}
const (
PerfBitDisabled uint64 = CBitFieldMaskBit0
PerfBitInherit = CBitFieldMaskBit1
PerfBitPinned = CBitFieldMaskBit2
PerfBitExclusive = CBitFieldMaskBit3
PerfBitExcludeUser = CBitFieldMaskBit4
PerfBitExcludeKernel = CBitFieldMaskBit5
PerfBitExcludeHv = CBitFieldMaskBit6
PerfBitExcludeIdle = CBitFieldMaskBit7
PerfBitMmap = CBitFieldMaskBit8
PerfBitComm = CBitFieldMaskBit9
PerfBitFreq = CBitFieldMaskBit10
PerfBitInheritStat = CBitFieldMaskBit11
PerfBitEnableOnExec = CBitFieldMaskBit12
PerfBitTask = CBitFieldMaskBit13
PerfBitWatermark = CBitFieldMaskBit14
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
PerfBitMmapData = CBitFieldMaskBit17
PerfBitSampleIDAll = CBitFieldMaskBit18
PerfBitExcludeHost = CBitFieldMaskBit19
PerfBitExcludeGuest = CBitFieldMaskBit20
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
PerfBitMmap2 = CBitFieldMaskBit23
PerfBitCommExec = CBitFieldMaskBit24
PerfBitUseClockID = CBitFieldMaskBit25
PerfBitContextSwitch = CBitFieldMaskBit26
)
const (
PERF_TYPE_HARDWARE = 0x0
PERF_TYPE_SOFTWARE = 0x1
PERF_TYPE_TRACEPOINT = 0x2
PERF_TYPE_HW_CACHE = 0x3
PERF_TYPE_RAW = 0x4
PERF_TYPE_BREAKPOINT = 0x5
PERF_COUNT_HW_CPU_CYCLES = 0x0
PERF_COUNT_HW_INSTRUCTIONS = 0x1
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
PERF_COUNT_HW_CACHE_MISSES = 0x3
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
PERF_COUNT_HW_BRANCH_MISSES = 0x5
PERF_COUNT_HW_BUS_CYCLES = 0x6
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
PERF_COUNT_HW_CACHE_L1D = 0x0
PERF_COUNT_HW_CACHE_L1I = 0x1
PERF_COUNT_HW_CACHE_LL = 0x2
PERF_COUNT_HW_CACHE_DTLB = 0x3
PERF_COUNT_HW_CACHE_ITLB = 0x4
PERF_COUNT_HW_CACHE_BPU = 0x5
PERF_COUNT_HW_CACHE_NODE = 0x6
PERF_COUNT_HW_CACHE_OP_READ = 0x0
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
PERF_COUNT_SW_CPU_CLOCK = 0x0
PERF_COUNT_SW_TASK_CLOCK = 0x1
PERF_COUNT_SW_PAGE_FAULTS = 0x2
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9
PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2
PERF_SAMPLE_TIME = 0x4
PERF_SAMPLE_ADDR = 0x8
PERF_SAMPLE_READ = 0x10
PERF_SAMPLE_CALLCHAIN = 0x20
PERF_SAMPLE_ID = 0x40
PERF_SAMPLE_CPU = 0x80
PERF_SAMPLE_PERIOD = 0x100
PERF_SAMPLE_STREAM_ID = 0x200
PERF_SAMPLE_RAW = 0x400
PERF_SAMPLE_BRANCH_STACK = 0x800
PERF_SAMPLE_BRANCH_USER = 0x1
PERF_SAMPLE_BRANCH_KERNEL = 0x2
PERF_SAMPLE_BRANCH_HV = 0x4
PERF_SAMPLE_BRANCH_ANY = 0x8
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9
PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80
PERF_CONTEXT_USER = -0x200
PERF_CONTEXT_GUEST = -0x800
PERF_CONTEXT_GUEST_KERNEL = -0x880
PERF_CONTEXT_GUEST_USER = -0xa00
PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4
)
const (
CBitFieldMaskBit0 = 0x1
CBitFieldMaskBit1 = 0x2
@ -959,3 +1130,115 @@ const (
CBitFieldMaskBit62 = 0x4000000000000000
CBitFieldMaskBit63 = 0x8000000000000000
)
type SockaddrStorage struct {
Family uint16
_ [118]int8
_ uint64
}
type TCPMD5Sig struct {
Addr SockaddrStorage
Flags uint8
Prefixlen uint8
Keylen uint16
_ uint32
Key [80]uint8
}
type HDDriveCmdHdr struct {
Command uint8
Number uint8
Feature uint8
Count uint8
}
type HDGeometry struct {
Heads uint8
Sectors uint8
Cylinders uint16
_ [4]byte
Start uint64
}
type HDDriveID struct {
Config uint16
Cyls uint16
Reserved2 uint16
Heads uint16
Track_bytes uint16
Sector_bytes uint16
Sectors uint16
Vendor0 uint16
Vendor1 uint16
Vendor2 uint16
Serial_no [20]uint8
Buf_type uint16
Buf_size uint16
Ecc_bytes uint16
Fw_rev [8]uint8
Model [40]uint8
Max_multsect uint8
Vendor3 uint8
Dword_io uint16
Vendor4 uint8
Capability uint8
Reserved50 uint16
Vendor5 uint8
TPIO uint8
Vendor6 uint8
TDMA uint8
Field_valid uint16
Cur_cyls uint16
Cur_heads uint16
Cur_sectors uint16
Cur_capacity0 uint16
Cur_capacity1 uint16
Multsect uint8
Multsect_valid uint8
Lba_capacity uint32
Dma_1word uint16
Dma_mword uint16
Eide_pio_modes uint16
Eide_dma_min uint16
Eide_dma_time uint16
Eide_pio uint16
Eide_pio_iordy uint16
Words69_70 [2]uint16
Words71_74 [4]uint16
Queue_depth uint16
Words76_79 [4]uint16
Major_rev_num uint16
Minor_rev_num uint16
Command_set_1 uint16
Command_set_2 uint16
Cfsse uint16
Cfs_enable_1 uint16
Cfs_enable_2 uint16
Csf_default uint16
Dma_ultra uint16
Trseuc uint16
TrsEuc uint16
CurAPMvalues uint16
Mprc uint16
Hw_config uint16
Acoustic uint16
Msrqs uint16
Sxfert uint16
Sal uint16
Spg uint32
Lba_capacity_2 uint64
Words104_125 [22]uint16
Last_lun uint16
Word127 uint16
Dlf uint16
Csfo uint16
Words130_155 [26]uint16
Word156 uint16
Words157_159 [3]uint16
Cfa_power uint16
Words161_175 [15]uint16
Words176_205 [30]uint16
Words206_254 [49]uint16
Integrity_word uint16
}

View File

@ -133,9 +133,9 @@ type Statfs_t struct {
}
type StatxTimestamp struct {
Sec int64
Nsec uint32
X__reserved int32
Sec int64
Nsec uint32
_ int32
}
type Statx_t struct {
@ -172,7 +172,7 @@ type Dirent struct {
}
type Fsid struct {
X__val [2]int32
Val [2]int32
}
type Flock_t struct {
@ -586,12 +586,12 @@ type RtAttr struct {
}
type IfInfomsg struct {
Family uint8
X__ifi_pad uint8
Type uint16
Index int32
Flags uint32
Change uint32
Family uint8
_ uint8
Type uint16
Index int32
Flags uint32
Change uint32
}
type IfAddrmsg struct {
@ -676,7 +676,7 @@ type Sysinfo_t struct {
Totalhigh uint32
Freehigh uint32
Unit uint32
X_f [8]int8
_ [8]int8
}
type Utsname struct {
@ -733,7 +733,7 @@ const (
)
type Sigset_t struct {
X__val [32]uint32
Val [32]uint32
}
const RNDGETENTCNT = 0x40045200
@ -890,6 +890,177 @@ const (
BDADDR_LE_RANDOM = 0x2
)
type PerfEventAttr struct {
Type uint32
Size uint32
Config uint64
Sample uint64
Sample_type uint64
Read_format uint64
Bits uint64
Wakeup uint32
Bp_type uint32
Ext1 uint64
Ext2 uint64
Branch_sample_type uint64
Sample_regs_user uint64
Sample_stack_user uint32
Clockid int32
Sample_regs_intr uint64
Aux_watermark uint32
_ uint32
}
type PerfEventMmapPage struct {
Version uint32
Compat_version uint32
Lock uint32
Index uint32
Offset int64
Time_enabled uint64
Time_running uint64
Capabilities uint64
Pmc_width uint16
Time_shift uint16
Time_mult uint32
Time_offset uint64
Time_zero uint64
Size uint32
_ [948]uint8
Data_head uint64
Data_tail uint64
Data_offset uint64
Data_size uint64
Aux_head uint64
Aux_tail uint64
Aux_offset uint64
Aux_size uint64
}
const (
PerfBitDisabled uint64 = CBitFieldMaskBit0
PerfBitInherit = CBitFieldMaskBit1
PerfBitPinned = CBitFieldMaskBit2
PerfBitExclusive = CBitFieldMaskBit3
PerfBitExcludeUser = CBitFieldMaskBit4
PerfBitExcludeKernel = CBitFieldMaskBit5
PerfBitExcludeHv = CBitFieldMaskBit6
PerfBitExcludeIdle = CBitFieldMaskBit7
PerfBitMmap = CBitFieldMaskBit8
PerfBitComm = CBitFieldMaskBit9
PerfBitFreq = CBitFieldMaskBit10
PerfBitInheritStat = CBitFieldMaskBit11
PerfBitEnableOnExec = CBitFieldMaskBit12
PerfBitTask = CBitFieldMaskBit13
PerfBitWatermark = CBitFieldMaskBit14
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
PerfBitMmapData = CBitFieldMaskBit17
PerfBitSampleIDAll = CBitFieldMaskBit18
PerfBitExcludeHost = CBitFieldMaskBit19
PerfBitExcludeGuest = CBitFieldMaskBit20
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
PerfBitMmap2 = CBitFieldMaskBit23
PerfBitCommExec = CBitFieldMaskBit24
PerfBitUseClockID = CBitFieldMaskBit25
PerfBitContextSwitch = CBitFieldMaskBit26
)
const (
PERF_TYPE_HARDWARE = 0x0
PERF_TYPE_SOFTWARE = 0x1
PERF_TYPE_TRACEPOINT = 0x2
PERF_TYPE_HW_CACHE = 0x3
PERF_TYPE_RAW = 0x4
PERF_TYPE_BREAKPOINT = 0x5
PERF_COUNT_HW_CPU_CYCLES = 0x0
PERF_COUNT_HW_INSTRUCTIONS = 0x1
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
PERF_COUNT_HW_CACHE_MISSES = 0x3
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
PERF_COUNT_HW_BRANCH_MISSES = 0x5
PERF_COUNT_HW_BUS_CYCLES = 0x6
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
PERF_COUNT_HW_CACHE_L1D = 0x0
PERF_COUNT_HW_CACHE_L1I = 0x1
PERF_COUNT_HW_CACHE_LL = 0x2
PERF_COUNT_HW_CACHE_DTLB = 0x3
PERF_COUNT_HW_CACHE_ITLB = 0x4
PERF_COUNT_HW_CACHE_BPU = 0x5
PERF_COUNT_HW_CACHE_NODE = 0x6
PERF_COUNT_HW_CACHE_OP_READ = 0x0
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
PERF_COUNT_SW_CPU_CLOCK = 0x0
PERF_COUNT_SW_TASK_CLOCK = 0x1
PERF_COUNT_SW_PAGE_FAULTS = 0x2
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9
PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2
PERF_SAMPLE_TIME = 0x4
PERF_SAMPLE_ADDR = 0x8
PERF_SAMPLE_READ = 0x10
PERF_SAMPLE_CALLCHAIN = 0x20
PERF_SAMPLE_ID = 0x40
PERF_SAMPLE_CPU = 0x80
PERF_SAMPLE_PERIOD = 0x100
PERF_SAMPLE_STREAM_ID = 0x200
PERF_SAMPLE_RAW = 0x400
PERF_SAMPLE_BRANCH_STACK = 0x800
PERF_SAMPLE_BRANCH_USER = 0x1
PERF_SAMPLE_BRANCH_KERNEL = 0x2
PERF_SAMPLE_BRANCH_HV = 0x4
PERF_SAMPLE_BRANCH_ANY = 0x8
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9
PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80
PERF_CONTEXT_USER = -0x200
PERF_CONTEXT_GUEST = -0x800
PERF_CONTEXT_GUEST_KERNEL = -0x880
PERF_CONTEXT_GUEST_USER = -0xa00
PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4
)
const (
CBitFieldMaskBit0 = 0x8000000000000000
CBitFieldMaskBit1 = 0x4000000000000000
@ -956,3 +1127,114 @@ const (
CBitFieldMaskBit62 = 0x2
CBitFieldMaskBit63 = 0x1
)
type SockaddrStorage struct {
Family uint16
_ [122]int8
_ uint32
}
type TCPMD5Sig struct {
Addr SockaddrStorage
Flags uint8
Prefixlen uint8
Keylen uint16
_ uint32
Key [80]uint8
}
type HDDriveCmdHdr struct {
Command uint8
Number uint8
Feature uint8
Count uint8
}
type HDGeometry struct {
Heads uint8
Sectors uint8
Cylinders uint16
Start uint32
}
type HDDriveID struct {
Config uint16
Cyls uint16
Reserved2 uint16
Heads uint16
Track_bytes uint16
Sector_bytes uint16
Sectors uint16
Vendor0 uint16
Vendor1 uint16
Vendor2 uint16
Serial_no [20]uint8
Buf_type uint16
Buf_size uint16
Ecc_bytes uint16
Fw_rev [8]uint8
Model [40]uint8
Max_multsect uint8
Vendor3 uint8
Dword_io uint16
Vendor4 uint8
Capability uint8
Reserved50 uint16
Vendor5 uint8
TPIO uint8
Vendor6 uint8
TDMA uint8
Field_valid uint16
Cur_cyls uint16
Cur_heads uint16
Cur_sectors uint16
Cur_capacity0 uint16
Cur_capacity1 uint16
Multsect uint8
Multsect_valid uint8
Lba_capacity uint32
Dma_1word uint16
Dma_mword uint16
Eide_pio_modes uint16
Eide_dma_min uint16
Eide_dma_time uint16
Eide_pio uint16
Eide_pio_iordy uint16
Words69_70 [2]uint16
Words71_74 [4]uint16
Queue_depth uint16
Words76_79 [4]uint16
Major_rev_num uint16
Minor_rev_num uint16
Command_set_1 uint16
Command_set_2 uint16
Cfsse uint16
Cfs_enable_1 uint16
Cfs_enable_2 uint16
Csf_default uint16
Dma_ultra uint16
Trseuc uint16
TrsEuc uint16
CurAPMvalues uint16
Mprc uint16
Hw_config uint16
Acoustic uint16
Msrqs uint16
Sxfert uint16
Sal uint16
Spg uint32
Lba_capacity_2 uint64
Words104_125 [22]uint16
Last_lun uint16
Word127 uint16
Dlf uint16
Csfo uint16
Words130_155 [26]uint16
Word156 uint16
Words157_159 [3]uint16
Cfa_power uint16
Words161_175 [15]uint16
Words176_205 [30]uint16
Words206_254 [49]uint16
Integrity_word uint16
}

View File

@ -133,9 +133,9 @@ type Statfs_t struct {
}
type StatxTimestamp struct {
Sec int64
Nsec uint32
X__reserved int32
Sec int64
Nsec uint32
_ int32
}
type Statx_t struct {
@ -172,7 +172,7 @@ type Dirent struct {
}
type Fsid struct {
X__val [2]int32
Val [2]int32
}
type Flock_t struct {
@ -588,12 +588,12 @@ type RtAttr struct {
}
type IfInfomsg struct {
Family uint8
X__ifi_pad uint8
Type uint16
Index int32
Flags uint32
Change uint32
Family uint8
_ uint8
Type uint16
Index int32
Flags uint32
Change uint32
}
type IfAddrmsg struct {
@ -679,7 +679,7 @@ type Sysinfo_t struct {
Totalhigh uint64
Freehigh uint64
Unit uint32
X_f [0]int8
_ [0]int8
_ [4]byte
}
@ -738,7 +738,7 @@ const (
)
type Sigset_t struct {
X__val [16]uint64
Val [16]uint64
}
const RNDGETENTCNT = 0x40045200
@ -895,6 +895,177 @@ const (
BDADDR_LE_RANDOM = 0x2
)
type PerfEventAttr struct {
Type uint32
Size uint32
Config uint64
Sample uint64
Sample_type uint64
Read_format uint64
Bits uint64
Wakeup uint32
Bp_type uint32
Ext1 uint64
Ext2 uint64
Branch_sample_type uint64
Sample_regs_user uint64
Sample_stack_user uint32
Clockid int32
Sample_regs_intr uint64
Aux_watermark uint32
_ uint32
}
type PerfEventMmapPage struct {
Version uint32
Compat_version uint32
Lock uint32
Index uint32
Offset int64
Time_enabled uint64
Time_running uint64
Capabilities uint64
Pmc_width uint16
Time_shift uint16
Time_mult uint32
Time_offset uint64
Time_zero uint64
Size uint32
_ [948]uint8
Data_head uint64
Data_tail uint64
Data_offset uint64
Data_size uint64
Aux_head uint64
Aux_tail uint64
Aux_offset uint64
Aux_size uint64
}
const (
PerfBitDisabled uint64 = CBitFieldMaskBit0
PerfBitInherit = CBitFieldMaskBit1
PerfBitPinned = CBitFieldMaskBit2
PerfBitExclusive = CBitFieldMaskBit3
PerfBitExcludeUser = CBitFieldMaskBit4
PerfBitExcludeKernel = CBitFieldMaskBit5
PerfBitExcludeHv = CBitFieldMaskBit6
PerfBitExcludeIdle = CBitFieldMaskBit7
PerfBitMmap = CBitFieldMaskBit8
PerfBitComm = CBitFieldMaskBit9
PerfBitFreq = CBitFieldMaskBit10
PerfBitInheritStat = CBitFieldMaskBit11
PerfBitEnableOnExec = CBitFieldMaskBit12
PerfBitTask = CBitFieldMaskBit13
PerfBitWatermark = CBitFieldMaskBit14
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
PerfBitMmapData = CBitFieldMaskBit17
PerfBitSampleIDAll = CBitFieldMaskBit18
PerfBitExcludeHost = CBitFieldMaskBit19
PerfBitExcludeGuest = CBitFieldMaskBit20
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
PerfBitMmap2 = CBitFieldMaskBit23
PerfBitCommExec = CBitFieldMaskBit24
PerfBitUseClockID = CBitFieldMaskBit25
PerfBitContextSwitch = CBitFieldMaskBit26
)
const (
PERF_TYPE_HARDWARE = 0x0
PERF_TYPE_SOFTWARE = 0x1
PERF_TYPE_TRACEPOINT = 0x2
PERF_TYPE_HW_CACHE = 0x3
PERF_TYPE_RAW = 0x4
PERF_TYPE_BREAKPOINT = 0x5
PERF_COUNT_HW_CPU_CYCLES = 0x0
PERF_COUNT_HW_INSTRUCTIONS = 0x1
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
PERF_COUNT_HW_CACHE_MISSES = 0x3
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
PERF_COUNT_HW_BRANCH_MISSES = 0x5
PERF_COUNT_HW_BUS_CYCLES = 0x6
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
PERF_COUNT_HW_CACHE_L1D = 0x0
PERF_COUNT_HW_CACHE_L1I = 0x1
PERF_COUNT_HW_CACHE_LL = 0x2
PERF_COUNT_HW_CACHE_DTLB = 0x3
PERF_COUNT_HW_CACHE_ITLB = 0x4
PERF_COUNT_HW_CACHE_BPU = 0x5
PERF_COUNT_HW_CACHE_NODE = 0x6
PERF_COUNT_HW_CACHE_OP_READ = 0x0
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
PERF_COUNT_SW_CPU_CLOCK = 0x0
PERF_COUNT_SW_TASK_CLOCK = 0x1
PERF_COUNT_SW_PAGE_FAULTS = 0x2
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9
PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2
PERF_SAMPLE_TIME = 0x4
PERF_SAMPLE_ADDR = 0x8
PERF_SAMPLE_READ = 0x10
PERF_SAMPLE_CALLCHAIN = 0x20
PERF_SAMPLE_ID = 0x40
PERF_SAMPLE_CPU = 0x80
PERF_SAMPLE_PERIOD = 0x100
PERF_SAMPLE_STREAM_ID = 0x200
PERF_SAMPLE_RAW = 0x400
PERF_SAMPLE_BRANCH_STACK = 0x800
PERF_SAMPLE_BRANCH_USER = 0x1
PERF_SAMPLE_BRANCH_KERNEL = 0x2
PERF_SAMPLE_BRANCH_HV = 0x4
PERF_SAMPLE_BRANCH_ANY = 0x8
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9
PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80
PERF_CONTEXT_USER = -0x200
PERF_CONTEXT_GUEST = -0x800
PERF_CONTEXT_GUEST_KERNEL = -0x880
PERF_CONTEXT_GUEST_USER = -0xa00
PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4
)
const (
CBitFieldMaskBit0 = 0x8000000000000000
CBitFieldMaskBit1 = 0x4000000000000000
@ -961,3 +1132,115 @@ const (
CBitFieldMaskBit62 = 0x2
CBitFieldMaskBit63 = 0x1
)
type SockaddrStorage struct {
Family uint16
_ [118]int8
_ uint64
}
type TCPMD5Sig struct {
Addr SockaddrStorage
Flags uint8
Prefixlen uint8
Keylen uint16
_ uint32
Key [80]uint8
}
type HDDriveCmdHdr struct {
Command uint8
Number uint8
Feature uint8
Count uint8
}
type HDGeometry struct {
Heads uint8
Sectors uint8
Cylinders uint16
_ [4]byte
Start uint64
}
type HDDriveID struct {
Config uint16
Cyls uint16
Reserved2 uint16
Heads uint16
Track_bytes uint16
Sector_bytes uint16
Sectors uint16
Vendor0 uint16
Vendor1 uint16
Vendor2 uint16
Serial_no [20]uint8
Buf_type uint16
Buf_size uint16
Ecc_bytes uint16
Fw_rev [8]uint8
Model [40]uint8
Max_multsect uint8
Vendor3 uint8
Dword_io uint16
Vendor4 uint8
Capability uint8
Reserved50 uint16
Vendor5 uint8
TPIO uint8
Vendor6 uint8
TDMA uint8
Field_valid uint16
Cur_cyls uint16
Cur_heads uint16
Cur_sectors uint16
Cur_capacity0 uint16
Cur_capacity1 uint16
Multsect uint8
Multsect_valid uint8
Lba_capacity uint32
Dma_1word uint16
Dma_mword uint16
Eide_pio_modes uint16
Eide_dma_min uint16
Eide_dma_time uint16
Eide_pio uint16
Eide_pio_iordy uint16
Words69_70 [2]uint16
Words71_74 [4]uint16
Queue_depth uint16
Words76_79 [4]uint16
Major_rev_num uint16
Minor_rev_num uint16
Command_set_1 uint16
Command_set_2 uint16
Cfsse uint16
Cfs_enable_1 uint16
Cfs_enable_2 uint16
Csf_default uint16
Dma_ultra uint16
Trseuc uint16
TrsEuc uint16
CurAPMvalues uint16
Mprc uint16
Hw_config uint16
Acoustic uint16
Msrqs uint16
Sxfert uint16
Sal uint16
Spg uint32
Lba_capacity_2 uint64
Words104_125 [22]uint16
Last_lun uint16
Word127 uint16
Dlf uint16
Csfo uint16
Words130_155 [26]uint16
Word156 uint16
Words157_159 [3]uint16
Cfa_power uint16
Words161_175 [15]uint16
Words176_205 [30]uint16
Words206_254 [49]uint16
Integrity_word uint16
}

View File

@ -133,9 +133,9 @@ type Statfs_t struct {
}
type StatxTimestamp struct {
Sec int64
Nsec uint32
X__reserved int32
Sec int64
Nsec uint32
_ int32
}
type Statx_t struct {
@ -172,7 +172,7 @@ type Dirent struct {
}
type Fsid struct {
X__val [2]int32
Val [2]int32
}
type Flock_t struct {
@ -588,12 +588,12 @@ type RtAttr struct {
}
type IfInfomsg struct {
Family uint8
X__ifi_pad uint8
Type uint16
Index int32
Flags uint32
Change uint32
Family uint8
_ uint8
Type uint16
Index int32
Flags uint32
Change uint32
}
type IfAddrmsg struct {
@ -679,7 +679,7 @@ type Sysinfo_t struct {
Totalhigh uint64
Freehigh uint64
Unit uint32
X_f [0]int8
_ [0]int8
_ [4]byte
}
@ -738,7 +738,7 @@ const (
)
type Sigset_t struct {
X__val [16]uint64
Val [16]uint64
}
const RNDGETENTCNT = 0x40045200
@ -895,6 +895,177 @@ const (
BDADDR_LE_RANDOM = 0x2
)
type PerfEventAttr struct {
Type uint32
Size uint32
Config uint64
Sample uint64
Sample_type uint64
Read_format uint64
Bits uint64
Wakeup uint32
Bp_type uint32
Ext1 uint64
Ext2 uint64
Branch_sample_type uint64
Sample_regs_user uint64
Sample_stack_user uint32
Clockid int32
Sample_regs_intr uint64
Aux_watermark uint32
_ uint32
}
type PerfEventMmapPage struct {
Version uint32
Compat_version uint32
Lock uint32
Index uint32
Offset int64
Time_enabled uint64
Time_running uint64
Capabilities uint64
Pmc_width uint16
Time_shift uint16
Time_mult uint32
Time_offset uint64
Time_zero uint64
Size uint32
_ [948]uint8
Data_head uint64
Data_tail uint64
Data_offset uint64
Data_size uint64
Aux_head uint64
Aux_tail uint64
Aux_offset uint64
Aux_size uint64
}
const (
PerfBitDisabled uint64 = CBitFieldMaskBit0
PerfBitInherit = CBitFieldMaskBit1
PerfBitPinned = CBitFieldMaskBit2
PerfBitExclusive = CBitFieldMaskBit3
PerfBitExcludeUser = CBitFieldMaskBit4
PerfBitExcludeKernel = CBitFieldMaskBit5
PerfBitExcludeHv = CBitFieldMaskBit6
PerfBitExcludeIdle = CBitFieldMaskBit7
PerfBitMmap = CBitFieldMaskBit8
PerfBitComm = CBitFieldMaskBit9
PerfBitFreq = CBitFieldMaskBit10
PerfBitInheritStat = CBitFieldMaskBit11
PerfBitEnableOnExec = CBitFieldMaskBit12
PerfBitTask = CBitFieldMaskBit13
PerfBitWatermark = CBitFieldMaskBit14
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
PerfBitMmapData = CBitFieldMaskBit17
PerfBitSampleIDAll = CBitFieldMaskBit18
PerfBitExcludeHost = CBitFieldMaskBit19
PerfBitExcludeGuest = CBitFieldMaskBit20
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
PerfBitMmap2 = CBitFieldMaskBit23
PerfBitCommExec = CBitFieldMaskBit24
PerfBitUseClockID = CBitFieldMaskBit25
PerfBitContextSwitch = CBitFieldMaskBit26
)
const (
PERF_TYPE_HARDWARE = 0x0
PERF_TYPE_SOFTWARE = 0x1
PERF_TYPE_TRACEPOINT = 0x2
PERF_TYPE_HW_CACHE = 0x3
PERF_TYPE_RAW = 0x4
PERF_TYPE_BREAKPOINT = 0x5
PERF_COUNT_HW_CPU_CYCLES = 0x0
PERF_COUNT_HW_INSTRUCTIONS = 0x1
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
PERF_COUNT_HW_CACHE_MISSES = 0x3
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
PERF_COUNT_HW_BRANCH_MISSES = 0x5
PERF_COUNT_HW_BUS_CYCLES = 0x6
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
PERF_COUNT_HW_CACHE_L1D = 0x0
PERF_COUNT_HW_CACHE_L1I = 0x1
PERF_COUNT_HW_CACHE_LL = 0x2
PERF_COUNT_HW_CACHE_DTLB = 0x3
PERF_COUNT_HW_CACHE_ITLB = 0x4
PERF_COUNT_HW_CACHE_BPU = 0x5
PERF_COUNT_HW_CACHE_NODE = 0x6
PERF_COUNT_HW_CACHE_OP_READ = 0x0
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
PERF_COUNT_SW_CPU_CLOCK = 0x0
PERF_COUNT_SW_TASK_CLOCK = 0x1
PERF_COUNT_SW_PAGE_FAULTS = 0x2
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9
PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2
PERF_SAMPLE_TIME = 0x4
PERF_SAMPLE_ADDR = 0x8
PERF_SAMPLE_READ = 0x10
PERF_SAMPLE_CALLCHAIN = 0x20
PERF_SAMPLE_ID = 0x40
PERF_SAMPLE_CPU = 0x80
PERF_SAMPLE_PERIOD = 0x100
PERF_SAMPLE_STREAM_ID = 0x200
PERF_SAMPLE_RAW = 0x400
PERF_SAMPLE_BRANCH_STACK = 0x800
PERF_SAMPLE_BRANCH_USER = 0x1
PERF_SAMPLE_BRANCH_KERNEL = 0x2
PERF_SAMPLE_BRANCH_HV = 0x4
PERF_SAMPLE_BRANCH_ANY = 0x8
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9
PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80
PERF_CONTEXT_USER = -0x200
PERF_CONTEXT_GUEST = -0x800
PERF_CONTEXT_GUEST_KERNEL = -0x880
PERF_CONTEXT_GUEST_USER = -0xa00
PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4
)
const (
CBitFieldMaskBit0 = 0x1
CBitFieldMaskBit1 = 0x2
@ -961,3 +1132,115 @@ const (
CBitFieldMaskBit62 = 0x4000000000000000
CBitFieldMaskBit63 = 0x8000000000000000
)
type SockaddrStorage struct {
Family uint16
_ [118]int8
_ uint64
}
type TCPMD5Sig struct {
Addr SockaddrStorage
Flags uint8
Prefixlen uint8
Keylen uint16
_ uint32
Key [80]uint8
}
type HDDriveCmdHdr struct {
Command uint8
Number uint8
Feature uint8
Count uint8
}
type HDGeometry struct {
Heads uint8
Sectors uint8
Cylinders uint16
_ [4]byte
Start uint64
}
type HDDriveID struct {
Config uint16
Cyls uint16
Reserved2 uint16
Heads uint16
Track_bytes uint16
Sector_bytes uint16
Sectors uint16
Vendor0 uint16
Vendor1 uint16
Vendor2 uint16
Serial_no [20]uint8
Buf_type uint16
Buf_size uint16
Ecc_bytes uint16
Fw_rev [8]uint8
Model [40]uint8
Max_multsect uint8
Vendor3 uint8
Dword_io uint16
Vendor4 uint8
Capability uint8
Reserved50 uint16
Vendor5 uint8
TPIO uint8
Vendor6 uint8
TDMA uint8
Field_valid uint16
Cur_cyls uint16
Cur_heads uint16
Cur_sectors uint16
Cur_capacity0 uint16
Cur_capacity1 uint16
Multsect uint8
Multsect_valid uint8
Lba_capacity uint32
Dma_1word uint16
Dma_mword uint16
Eide_pio_modes uint16
Eide_dma_min uint16
Eide_dma_time uint16
Eide_pio uint16
Eide_pio_iordy uint16
Words69_70 [2]uint16
Words71_74 [4]uint16
Queue_depth uint16
Words76_79 [4]uint16
Major_rev_num uint16
Minor_rev_num uint16
Command_set_1 uint16
Command_set_2 uint16
Cfsse uint16
Cfs_enable_1 uint16
Cfs_enable_2 uint16
Csf_default uint16
Dma_ultra uint16
Trseuc uint16
TrsEuc uint16
CurAPMvalues uint16
Mprc uint16
Hw_config uint16
Acoustic uint16
Msrqs uint16
Sxfert uint16
Sal uint16
Spg uint32
Lba_capacity_2 uint64
Words104_125 [22]uint16
Last_lun uint16
Word127 uint16
Dlf uint16
Csfo uint16
Words130_155 [26]uint16
Word156 uint16
Words157_159 [3]uint16
Cfa_power uint16
Words161_175 [15]uint16
Words176_205 [30]uint16
Words206_254 [49]uint16
Integrity_word uint16
}

View File

@ -133,9 +133,9 @@ type Statfs_t struct {
}
type StatxTimestamp struct {
Sec int64
Nsec uint32
X__reserved int32
Sec int64
Nsec uint32
_ int32
}
type Statx_t struct {
@ -172,7 +172,7 @@ type Dirent struct {
}
type Fsid struct {
X__val [2]int32
Val [2]int32
}
type Flock_t struct {
@ -586,12 +586,12 @@ type RtAttr struct {
}
type IfInfomsg struct {
Family uint8
X__ifi_pad uint8
Type uint16
Index int32
Flags uint32
Change uint32
Family uint8
_ uint8
Type uint16
Index int32
Flags uint32
Change uint32
}
type IfAddrmsg struct {
@ -676,7 +676,7 @@ type Sysinfo_t struct {
Totalhigh uint32
Freehigh uint32
Unit uint32
X_f [8]int8
_ [8]int8
}
type Utsname struct {
@ -733,7 +733,7 @@ const (
)
type Sigset_t struct {
X__val [32]uint32
Val [32]uint32
}
const RNDGETENTCNT = 0x40045200
@ -890,6 +890,177 @@ const (
BDADDR_LE_RANDOM = 0x2
)
type PerfEventAttr struct {
Type uint32
Size uint32
Config uint64
Sample uint64
Sample_type uint64
Read_format uint64
Bits uint64
Wakeup uint32
Bp_type uint32
Ext1 uint64
Ext2 uint64
Branch_sample_type uint64
Sample_regs_user uint64
Sample_stack_user uint32
Clockid int32
Sample_regs_intr uint64
Aux_watermark uint32
_ uint32
}
type PerfEventMmapPage struct {
Version uint32
Compat_version uint32
Lock uint32
Index uint32
Offset int64
Time_enabled uint64
Time_running uint64
Capabilities uint64
Pmc_width uint16
Time_shift uint16
Time_mult uint32
Time_offset uint64
Time_zero uint64
Size uint32
_ [948]uint8
Data_head uint64
Data_tail uint64
Data_offset uint64
Data_size uint64
Aux_head uint64
Aux_tail uint64
Aux_offset uint64
Aux_size uint64
}
const (
PerfBitDisabled uint64 = CBitFieldMaskBit0
PerfBitInherit = CBitFieldMaskBit1
PerfBitPinned = CBitFieldMaskBit2
PerfBitExclusive = CBitFieldMaskBit3
PerfBitExcludeUser = CBitFieldMaskBit4
PerfBitExcludeKernel = CBitFieldMaskBit5
PerfBitExcludeHv = CBitFieldMaskBit6
PerfBitExcludeIdle = CBitFieldMaskBit7
PerfBitMmap = CBitFieldMaskBit8
PerfBitComm = CBitFieldMaskBit9
PerfBitFreq = CBitFieldMaskBit10
PerfBitInheritStat = CBitFieldMaskBit11
PerfBitEnableOnExec = CBitFieldMaskBit12
PerfBitTask = CBitFieldMaskBit13
PerfBitWatermark = CBitFieldMaskBit14
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
PerfBitMmapData = CBitFieldMaskBit17
PerfBitSampleIDAll = CBitFieldMaskBit18
PerfBitExcludeHost = CBitFieldMaskBit19
PerfBitExcludeGuest = CBitFieldMaskBit20
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
PerfBitMmap2 = CBitFieldMaskBit23
PerfBitCommExec = CBitFieldMaskBit24
PerfBitUseClockID = CBitFieldMaskBit25
PerfBitContextSwitch = CBitFieldMaskBit26
)
const (
PERF_TYPE_HARDWARE = 0x0
PERF_TYPE_SOFTWARE = 0x1
PERF_TYPE_TRACEPOINT = 0x2
PERF_TYPE_HW_CACHE = 0x3
PERF_TYPE_RAW = 0x4
PERF_TYPE_BREAKPOINT = 0x5
PERF_COUNT_HW_CPU_CYCLES = 0x0
PERF_COUNT_HW_INSTRUCTIONS = 0x1
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
PERF_COUNT_HW_CACHE_MISSES = 0x3
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
PERF_COUNT_HW_BRANCH_MISSES = 0x5
PERF_COUNT_HW_BUS_CYCLES = 0x6
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
PERF_COUNT_HW_CACHE_L1D = 0x0
PERF_COUNT_HW_CACHE_L1I = 0x1
PERF_COUNT_HW_CACHE_LL = 0x2
PERF_COUNT_HW_CACHE_DTLB = 0x3
PERF_COUNT_HW_CACHE_ITLB = 0x4
PERF_COUNT_HW_CACHE_BPU = 0x5
PERF_COUNT_HW_CACHE_NODE = 0x6
PERF_COUNT_HW_CACHE_OP_READ = 0x0
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
PERF_COUNT_SW_CPU_CLOCK = 0x0
PERF_COUNT_SW_TASK_CLOCK = 0x1
PERF_COUNT_SW_PAGE_FAULTS = 0x2
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9
PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2
PERF_SAMPLE_TIME = 0x4
PERF_SAMPLE_ADDR = 0x8
PERF_SAMPLE_READ = 0x10
PERF_SAMPLE_CALLCHAIN = 0x20
PERF_SAMPLE_ID = 0x40
PERF_SAMPLE_CPU = 0x80
PERF_SAMPLE_PERIOD = 0x100
PERF_SAMPLE_STREAM_ID = 0x200
PERF_SAMPLE_RAW = 0x400
PERF_SAMPLE_BRANCH_STACK = 0x800
PERF_SAMPLE_BRANCH_USER = 0x1
PERF_SAMPLE_BRANCH_KERNEL = 0x2
PERF_SAMPLE_BRANCH_HV = 0x4
PERF_SAMPLE_BRANCH_ANY = 0x8
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9
PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80
PERF_CONTEXT_USER = -0x200
PERF_CONTEXT_GUEST = -0x800
PERF_CONTEXT_GUEST_KERNEL = -0x880
PERF_CONTEXT_GUEST_USER = -0xa00
PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4
)
const (
CBitFieldMaskBit0 = 0x1
CBitFieldMaskBit1 = 0x2
@ -956,3 +1127,114 @@ const (
CBitFieldMaskBit62 = 0x4000000000000000
CBitFieldMaskBit63 = 0x8000000000000000
)
type SockaddrStorage struct {
Family uint16
_ [122]int8
_ uint32
}
type TCPMD5Sig struct {
Addr SockaddrStorage
Flags uint8
Prefixlen uint8
Keylen uint16
_ uint32
Key [80]uint8
}
type HDDriveCmdHdr struct {
Command uint8
Number uint8
Feature uint8
Count uint8
}
type HDGeometry struct {
Heads uint8
Sectors uint8
Cylinders uint16
Start uint32
}
type HDDriveID struct {
Config uint16
Cyls uint16
Reserved2 uint16
Heads uint16
Track_bytes uint16
Sector_bytes uint16
Sectors uint16
Vendor0 uint16
Vendor1 uint16
Vendor2 uint16
Serial_no [20]uint8
Buf_type uint16
Buf_size uint16
Ecc_bytes uint16
Fw_rev [8]uint8
Model [40]uint8
Max_multsect uint8
Vendor3 uint8
Dword_io uint16
Vendor4 uint8
Capability uint8
Reserved50 uint16
Vendor5 uint8
TPIO uint8
Vendor6 uint8
TDMA uint8
Field_valid uint16
Cur_cyls uint16
Cur_heads uint16
Cur_sectors uint16
Cur_capacity0 uint16
Cur_capacity1 uint16
Multsect uint8
Multsect_valid uint8
Lba_capacity uint32
Dma_1word uint16
Dma_mword uint16
Eide_pio_modes uint16
Eide_dma_min uint16
Eide_dma_time uint16
Eide_pio uint16
Eide_pio_iordy uint16
Words69_70 [2]uint16
Words71_74 [4]uint16
Queue_depth uint16
Words76_79 [4]uint16
Major_rev_num uint16
Minor_rev_num uint16
Command_set_1 uint16
Command_set_2 uint16
Cfsse uint16
Cfs_enable_1 uint16
Cfs_enable_2 uint16
Csf_default uint16
Dma_ultra uint16
Trseuc uint16
TrsEuc uint16
CurAPMvalues uint16
Mprc uint16
Hw_config uint16
Acoustic uint16
Msrqs uint16
Sxfert uint16
Sal uint16
Spg uint32
Lba_capacity_2 uint64
Words104_125 [22]uint16
Last_lun uint16
Word127 uint16
Dlf uint16
Csfo uint16
Words130_155 [26]uint16
Word156 uint16
Words157_159 [3]uint16
Cfa_power uint16
Words161_175 [15]uint16
Words176_205 [30]uint16
Words206_254 [49]uint16
Integrity_word uint16
}

View File

@ -105,7 +105,7 @@ type Stat_t struct {
Mode uint32
Uid uint32
Gid uint32
X__pad2 int32
_ int32
Rdev uint64
Size int64
Blksize int64
@ -134,9 +134,9 @@ type Statfs_t struct {
}
type StatxTimestamp struct {
Sec int64
Nsec uint32
X__reserved int32
Sec int64
Nsec uint32
_ int32
}
type Statx_t struct {
@ -173,7 +173,7 @@ type Dirent struct {
}
type Fsid struct {
X__val [2]int32
Val [2]int32
}
type Flock_t struct {
@ -589,12 +589,12 @@ type RtAttr struct {
}
type IfInfomsg struct {
Family uint8
X__ifi_pad uint8
Type uint16
Index int32
Flags uint32
Change uint32
Family uint8
_ uint8
Type uint16
Index int32
Flags uint32
Change uint32
}
type IfAddrmsg struct {
@ -686,7 +686,7 @@ type Sysinfo_t struct {
Totalhigh uint64
Freehigh uint64
Unit uint32
X_f [0]uint8
_ [0]uint8
_ [4]byte
}
@ -709,10 +709,10 @@ type Ustat_t struct {
}
type EpollEvent struct {
Events uint32
X_padFd int32
Fd int32
Pad int32
Events uint32
_ int32
Fd int32
Pad int32
}
const (
@ -746,7 +746,7 @@ const (
)
type Sigset_t struct {
X__val [16]uint64
Val [16]uint64
}
const RNDGETENTCNT = 0x40045200
@ -903,6 +903,177 @@ const (
BDADDR_LE_RANDOM = 0x2
)
type PerfEventAttr struct {
Type uint32
Size uint32
Config uint64
Sample uint64
Sample_type uint64
Read_format uint64
Bits uint64
Wakeup uint32
Bp_type uint32
Ext1 uint64
Ext2 uint64
Branch_sample_type uint64
Sample_regs_user uint64
Sample_stack_user uint32
Clockid int32
Sample_regs_intr uint64
Aux_watermark uint32
_ uint32
}
type PerfEventMmapPage struct {
Version uint32
Compat_version uint32
Lock uint32
Index uint32
Offset int64
Time_enabled uint64
Time_running uint64
Capabilities uint64
Pmc_width uint16
Time_shift uint16
Time_mult uint32
Time_offset uint64
Time_zero uint64
Size uint32
_ [948]uint8
Data_head uint64
Data_tail uint64
Data_offset uint64
Data_size uint64
Aux_head uint64
Aux_tail uint64
Aux_offset uint64
Aux_size uint64
}
const (
PerfBitDisabled uint64 = CBitFieldMaskBit0
PerfBitInherit = CBitFieldMaskBit1
PerfBitPinned = CBitFieldMaskBit2
PerfBitExclusive = CBitFieldMaskBit3
PerfBitExcludeUser = CBitFieldMaskBit4
PerfBitExcludeKernel = CBitFieldMaskBit5
PerfBitExcludeHv = CBitFieldMaskBit6
PerfBitExcludeIdle = CBitFieldMaskBit7
PerfBitMmap = CBitFieldMaskBit8
PerfBitComm = CBitFieldMaskBit9
PerfBitFreq = CBitFieldMaskBit10
PerfBitInheritStat = CBitFieldMaskBit11
PerfBitEnableOnExec = CBitFieldMaskBit12
PerfBitTask = CBitFieldMaskBit13
PerfBitWatermark = CBitFieldMaskBit14
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
PerfBitMmapData = CBitFieldMaskBit17
PerfBitSampleIDAll = CBitFieldMaskBit18
PerfBitExcludeHost = CBitFieldMaskBit19
PerfBitExcludeGuest = CBitFieldMaskBit20
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
PerfBitMmap2 = CBitFieldMaskBit23
PerfBitCommExec = CBitFieldMaskBit24
PerfBitUseClockID = CBitFieldMaskBit25
PerfBitContextSwitch = CBitFieldMaskBit26
)
const (
PERF_TYPE_HARDWARE = 0x0
PERF_TYPE_SOFTWARE = 0x1
PERF_TYPE_TRACEPOINT = 0x2
PERF_TYPE_HW_CACHE = 0x3
PERF_TYPE_RAW = 0x4
PERF_TYPE_BREAKPOINT = 0x5
PERF_COUNT_HW_CPU_CYCLES = 0x0
PERF_COUNT_HW_INSTRUCTIONS = 0x1
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
PERF_COUNT_HW_CACHE_MISSES = 0x3
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
PERF_COUNT_HW_BRANCH_MISSES = 0x5
PERF_COUNT_HW_BUS_CYCLES = 0x6
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
PERF_COUNT_HW_CACHE_L1D = 0x0
PERF_COUNT_HW_CACHE_L1I = 0x1
PERF_COUNT_HW_CACHE_LL = 0x2
PERF_COUNT_HW_CACHE_DTLB = 0x3
PERF_COUNT_HW_CACHE_ITLB = 0x4
PERF_COUNT_HW_CACHE_BPU = 0x5
PERF_COUNT_HW_CACHE_NODE = 0x6
PERF_COUNT_HW_CACHE_OP_READ = 0x0
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
PERF_COUNT_SW_CPU_CLOCK = 0x0
PERF_COUNT_SW_TASK_CLOCK = 0x1
PERF_COUNT_SW_PAGE_FAULTS = 0x2
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9
PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2
PERF_SAMPLE_TIME = 0x4
PERF_SAMPLE_ADDR = 0x8
PERF_SAMPLE_READ = 0x10
PERF_SAMPLE_CALLCHAIN = 0x20
PERF_SAMPLE_ID = 0x40
PERF_SAMPLE_CPU = 0x80
PERF_SAMPLE_PERIOD = 0x100
PERF_SAMPLE_STREAM_ID = 0x200
PERF_SAMPLE_RAW = 0x400
PERF_SAMPLE_BRANCH_STACK = 0x800
PERF_SAMPLE_BRANCH_USER = 0x1
PERF_SAMPLE_BRANCH_KERNEL = 0x2
PERF_SAMPLE_BRANCH_HV = 0x4
PERF_SAMPLE_BRANCH_ANY = 0x8
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9
PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80
PERF_CONTEXT_USER = -0x200
PERF_CONTEXT_GUEST = -0x800
PERF_CONTEXT_GUEST_KERNEL = -0x880
PERF_CONTEXT_GUEST_USER = -0xa00
PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4
)
const (
CBitFieldMaskBit0 = 0x8000000000000000
CBitFieldMaskBit1 = 0x4000000000000000
@ -969,3 +1140,115 @@ const (
CBitFieldMaskBit62 = 0x2
CBitFieldMaskBit63 = 0x1
)
type SockaddrStorage struct {
Family uint16
_ [118]uint8
_ uint64
}
type TCPMD5Sig struct {
Addr SockaddrStorage
Flags uint8
Prefixlen uint8
Keylen uint16
_ uint32
Key [80]uint8
}
type HDDriveCmdHdr struct {
Command uint8
Number uint8
Feature uint8
Count uint8
}
type HDGeometry struct {
Heads uint8
Sectors uint8
Cylinders uint16
_ [4]byte
Start uint64
}
type HDDriveID struct {
Config uint16
Cyls uint16
Reserved2 uint16
Heads uint16
Track_bytes uint16
Sector_bytes uint16
Sectors uint16
Vendor0 uint16
Vendor1 uint16
Vendor2 uint16
Serial_no [20]uint8
Buf_type uint16
Buf_size uint16
Ecc_bytes uint16
Fw_rev [8]uint8
Model [40]uint8
Max_multsect uint8
Vendor3 uint8
Dword_io uint16
Vendor4 uint8
Capability uint8
Reserved50 uint16
Vendor5 uint8
TPIO uint8
Vendor6 uint8
TDMA uint8
Field_valid uint16
Cur_cyls uint16
Cur_heads uint16
Cur_sectors uint16
Cur_capacity0 uint16
Cur_capacity1 uint16
Multsect uint8
Multsect_valid uint8
Lba_capacity uint32
Dma_1word uint16
Dma_mword uint16
Eide_pio_modes uint16
Eide_dma_min uint16
Eide_dma_time uint16
Eide_pio uint16
Eide_pio_iordy uint16
Words69_70 [2]uint16
Words71_74 [4]uint16
Queue_depth uint16
Words76_79 [4]uint16
Major_rev_num uint16
Minor_rev_num uint16
Command_set_1 uint16
Command_set_2 uint16
Cfsse uint16
Cfs_enable_1 uint16
Cfs_enable_2 uint16
Csf_default uint16
Dma_ultra uint16
Trseuc uint16
TrsEuc uint16
CurAPMvalues uint16
Mprc uint16
Hw_config uint16
Acoustic uint16
Msrqs uint16
Sxfert uint16
Sal uint16
Spg uint32
Lba_capacity_2 uint64
Words104_125 [22]uint16
Last_lun uint16
Word127 uint16
Dlf uint16
Csfo uint16
Words130_155 [26]uint16
Word156 uint16
Words157_159 [3]uint16
Cfa_power uint16
Words161_175 [15]uint16
Words176_205 [30]uint16
Words206_254 [49]uint16
Integrity_word uint16
}

View File

@ -105,7 +105,7 @@ type Stat_t struct {
Mode uint32
Uid uint32
Gid uint32
X__pad2 int32
_ int32
Rdev uint64
Size int64
Blksize int64
@ -134,9 +134,9 @@ type Statfs_t struct {
}
type StatxTimestamp struct {
Sec int64
Nsec uint32
X__reserved int32
Sec int64
Nsec uint32
_ int32
}
type Statx_t struct {
@ -173,7 +173,7 @@ type Dirent struct {
}
type Fsid struct {
X__val [2]int32
Val [2]int32
}
type Flock_t struct {
@ -589,12 +589,12 @@ type RtAttr struct {
}
type IfInfomsg struct {
Family uint8
X__ifi_pad uint8
Type uint16
Index int32
Flags uint32
Change uint32
Family uint8
_ uint8
Type uint16
Index int32
Flags uint32
Change uint32
}
type IfAddrmsg struct {
@ -686,7 +686,7 @@ type Sysinfo_t struct {
Totalhigh uint64
Freehigh uint64
Unit uint32
X_f [0]uint8
_ [0]uint8
_ [4]byte
}
@ -709,10 +709,10 @@ type Ustat_t struct {
}
type EpollEvent struct {
Events uint32
X_padFd int32
Fd int32
Pad int32
Events uint32
_ int32
Fd int32
Pad int32
}
const (
@ -746,7 +746,7 @@ const (
)
type Sigset_t struct {
X__val [16]uint64
Val [16]uint64
}
const RNDGETENTCNT = 0x40045200
@ -903,6 +903,177 @@ const (
BDADDR_LE_RANDOM = 0x2
)
type PerfEventAttr struct {
Type uint32
Size uint32
Config uint64
Sample uint64
Sample_type uint64
Read_format uint64
Bits uint64
Wakeup uint32
Bp_type uint32
Ext1 uint64
Ext2 uint64
Branch_sample_type uint64
Sample_regs_user uint64
Sample_stack_user uint32
Clockid int32
Sample_regs_intr uint64
Aux_watermark uint32
_ uint32
}
type PerfEventMmapPage struct {
Version uint32
Compat_version uint32
Lock uint32
Index uint32
Offset int64
Time_enabled uint64
Time_running uint64
Capabilities uint64
Pmc_width uint16
Time_shift uint16
Time_mult uint32
Time_offset uint64
Time_zero uint64
Size uint32
_ [948]uint8
Data_head uint64
Data_tail uint64
Data_offset uint64
Data_size uint64
Aux_head uint64
Aux_tail uint64
Aux_offset uint64
Aux_size uint64
}
const (
PerfBitDisabled uint64 = CBitFieldMaskBit0
PerfBitInherit = CBitFieldMaskBit1
PerfBitPinned = CBitFieldMaskBit2
PerfBitExclusive = CBitFieldMaskBit3
PerfBitExcludeUser = CBitFieldMaskBit4
PerfBitExcludeKernel = CBitFieldMaskBit5
PerfBitExcludeHv = CBitFieldMaskBit6
PerfBitExcludeIdle = CBitFieldMaskBit7
PerfBitMmap = CBitFieldMaskBit8
PerfBitComm = CBitFieldMaskBit9
PerfBitFreq = CBitFieldMaskBit10
PerfBitInheritStat = CBitFieldMaskBit11
PerfBitEnableOnExec = CBitFieldMaskBit12
PerfBitTask = CBitFieldMaskBit13
PerfBitWatermark = CBitFieldMaskBit14
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
PerfBitMmapData = CBitFieldMaskBit17
PerfBitSampleIDAll = CBitFieldMaskBit18
PerfBitExcludeHost = CBitFieldMaskBit19
PerfBitExcludeGuest = CBitFieldMaskBit20
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
PerfBitMmap2 = CBitFieldMaskBit23
PerfBitCommExec = CBitFieldMaskBit24
PerfBitUseClockID = CBitFieldMaskBit25
PerfBitContextSwitch = CBitFieldMaskBit26
)
const (
PERF_TYPE_HARDWARE = 0x0
PERF_TYPE_SOFTWARE = 0x1
PERF_TYPE_TRACEPOINT = 0x2
PERF_TYPE_HW_CACHE = 0x3
PERF_TYPE_RAW = 0x4
PERF_TYPE_BREAKPOINT = 0x5
PERF_COUNT_HW_CPU_CYCLES = 0x0
PERF_COUNT_HW_INSTRUCTIONS = 0x1
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
PERF_COUNT_HW_CACHE_MISSES = 0x3
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
PERF_COUNT_HW_BRANCH_MISSES = 0x5
PERF_COUNT_HW_BUS_CYCLES = 0x6
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
PERF_COUNT_HW_CACHE_L1D = 0x0
PERF_COUNT_HW_CACHE_L1I = 0x1
PERF_COUNT_HW_CACHE_LL = 0x2
PERF_COUNT_HW_CACHE_DTLB = 0x3
PERF_COUNT_HW_CACHE_ITLB = 0x4
PERF_COUNT_HW_CACHE_BPU = 0x5
PERF_COUNT_HW_CACHE_NODE = 0x6
PERF_COUNT_HW_CACHE_OP_READ = 0x0
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
PERF_COUNT_SW_CPU_CLOCK = 0x0
PERF_COUNT_SW_TASK_CLOCK = 0x1
PERF_COUNT_SW_PAGE_FAULTS = 0x2
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9
PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2
PERF_SAMPLE_TIME = 0x4
PERF_SAMPLE_ADDR = 0x8
PERF_SAMPLE_READ = 0x10
PERF_SAMPLE_CALLCHAIN = 0x20
PERF_SAMPLE_ID = 0x40
PERF_SAMPLE_CPU = 0x80
PERF_SAMPLE_PERIOD = 0x100
PERF_SAMPLE_STREAM_ID = 0x200
PERF_SAMPLE_RAW = 0x400
PERF_SAMPLE_BRANCH_STACK = 0x800
PERF_SAMPLE_BRANCH_USER = 0x1
PERF_SAMPLE_BRANCH_KERNEL = 0x2
PERF_SAMPLE_BRANCH_HV = 0x4
PERF_SAMPLE_BRANCH_ANY = 0x8
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9
PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80
PERF_CONTEXT_USER = -0x200
PERF_CONTEXT_GUEST = -0x800
PERF_CONTEXT_GUEST_KERNEL = -0x880
PERF_CONTEXT_GUEST_USER = -0xa00
PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4
)
const (
CBitFieldMaskBit0 = 0x1
CBitFieldMaskBit1 = 0x2
@ -969,3 +1140,115 @@ const (
CBitFieldMaskBit62 = 0x4000000000000000
CBitFieldMaskBit63 = 0x8000000000000000
)
type SockaddrStorage struct {
Family uint16
_ [118]uint8
_ uint64
}
type TCPMD5Sig struct {
Addr SockaddrStorage
Flags uint8
Prefixlen uint8
Keylen uint16
_ uint32
Key [80]uint8
}
type HDDriveCmdHdr struct {
Command uint8
Number uint8
Feature uint8
Count uint8
}
type HDGeometry struct {
Heads uint8
Sectors uint8
Cylinders uint16
_ [4]byte
Start uint64
}
type HDDriveID struct {
Config uint16
Cyls uint16
Reserved2 uint16
Heads uint16
Track_bytes uint16
Sector_bytes uint16
Sectors uint16
Vendor0 uint16
Vendor1 uint16
Vendor2 uint16
Serial_no [20]uint8
Buf_type uint16
Buf_size uint16
Ecc_bytes uint16
Fw_rev [8]uint8
Model [40]uint8
Max_multsect uint8
Vendor3 uint8
Dword_io uint16
Vendor4 uint8
Capability uint8
Reserved50 uint16
Vendor5 uint8
TPIO uint8
Vendor6 uint8
TDMA uint8
Field_valid uint16
Cur_cyls uint16
Cur_heads uint16
Cur_sectors uint16
Cur_capacity0 uint16
Cur_capacity1 uint16
Multsect uint8
Multsect_valid uint8
Lba_capacity uint32
Dma_1word uint16
Dma_mword uint16
Eide_pio_modes uint16
Eide_dma_min uint16
Eide_dma_time uint16
Eide_pio uint16
Eide_pio_iordy uint16
Words69_70 [2]uint16
Words71_74 [4]uint16
Queue_depth uint16
Words76_79 [4]uint16
Major_rev_num uint16
Minor_rev_num uint16
Command_set_1 uint16
Command_set_2 uint16
Cfsse uint16
Cfs_enable_1 uint16
Cfs_enable_2 uint16
Csf_default uint16
Dma_ultra uint16
Trseuc uint16
TrsEuc uint16
CurAPMvalues uint16
Mprc uint16
Hw_config uint16
Acoustic uint16
Msrqs uint16
Sxfert uint16
Sal uint16
Spg uint32
Lba_capacity_2 uint64
Words104_125 [22]uint16
Last_lun uint16
Word127 uint16
Dlf uint16
Csfo uint16
Words130_155 [26]uint16
Word156 uint16
Words157_159 [3]uint16
Cfa_power uint16
Words161_175 [15]uint16
Words176_205 [30]uint16
Words206_254 [49]uint16
Integrity_word uint16
}

View File

@ -172,7 +172,7 @@ type Dirent struct {
}
type Fsid struct {
_ [2]int32
Val [2]int32
}
type Flock_t struct {
@ -763,7 +763,7 @@ const (
)
type Sigset_t struct {
_ [16]uint64
Val [16]uint64
}
const RNDGETENTCNT = 0x80045200
@ -920,6 +920,177 @@ const (
BDADDR_LE_RANDOM = 0x2
)
type PerfEventAttr struct {
Type uint32
Size uint32
Config uint64
Sample uint64
Sample_type uint64
Read_format uint64
Bits uint64
Wakeup uint32
Bp_type uint32
Ext1 uint64
Ext2 uint64
Branch_sample_type uint64
Sample_regs_user uint64
Sample_stack_user uint32
Clockid int32
Sample_regs_intr uint64
Aux_watermark uint32
_ uint32
}
type PerfEventMmapPage struct {
Version uint32
Compat_version uint32
Lock uint32
Index uint32
Offset int64
Time_enabled uint64
Time_running uint64
Capabilities uint64
Pmc_width uint16
Time_shift uint16
Time_mult uint32
Time_offset uint64
Time_zero uint64
Size uint32
_ [948]uint8
Data_head uint64
Data_tail uint64
Data_offset uint64
Data_size uint64
Aux_head uint64
Aux_tail uint64
Aux_offset uint64
Aux_size uint64
}
const (
PerfBitDisabled uint64 = CBitFieldMaskBit0
PerfBitInherit = CBitFieldMaskBit1
PerfBitPinned = CBitFieldMaskBit2
PerfBitExclusive = CBitFieldMaskBit3
PerfBitExcludeUser = CBitFieldMaskBit4
PerfBitExcludeKernel = CBitFieldMaskBit5
PerfBitExcludeHv = CBitFieldMaskBit6
PerfBitExcludeIdle = CBitFieldMaskBit7
PerfBitMmap = CBitFieldMaskBit8
PerfBitComm = CBitFieldMaskBit9
PerfBitFreq = CBitFieldMaskBit10
PerfBitInheritStat = CBitFieldMaskBit11
PerfBitEnableOnExec = CBitFieldMaskBit12
PerfBitTask = CBitFieldMaskBit13
PerfBitWatermark = CBitFieldMaskBit14
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
PerfBitMmapData = CBitFieldMaskBit17
PerfBitSampleIDAll = CBitFieldMaskBit18
PerfBitExcludeHost = CBitFieldMaskBit19
PerfBitExcludeGuest = CBitFieldMaskBit20
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
PerfBitMmap2 = CBitFieldMaskBit23
PerfBitCommExec = CBitFieldMaskBit24
PerfBitUseClockID = CBitFieldMaskBit25
PerfBitContextSwitch = CBitFieldMaskBit26
)
const (
PERF_TYPE_HARDWARE = 0x0
PERF_TYPE_SOFTWARE = 0x1
PERF_TYPE_TRACEPOINT = 0x2
PERF_TYPE_HW_CACHE = 0x3
PERF_TYPE_RAW = 0x4
PERF_TYPE_BREAKPOINT = 0x5
PERF_COUNT_HW_CPU_CYCLES = 0x0
PERF_COUNT_HW_INSTRUCTIONS = 0x1
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
PERF_COUNT_HW_CACHE_MISSES = 0x3
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
PERF_COUNT_HW_BRANCH_MISSES = 0x5
PERF_COUNT_HW_BUS_CYCLES = 0x6
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
PERF_COUNT_HW_CACHE_L1D = 0x0
PERF_COUNT_HW_CACHE_L1I = 0x1
PERF_COUNT_HW_CACHE_LL = 0x2
PERF_COUNT_HW_CACHE_DTLB = 0x3
PERF_COUNT_HW_CACHE_ITLB = 0x4
PERF_COUNT_HW_CACHE_BPU = 0x5
PERF_COUNT_HW_CACHE_NODE = 0x6
PERF_COUNT_HW_CACHE_OP_READ = 0x0
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
PERF_COUNT_SW_CPU_CLOCK = 0x0
PERF_COUNT_SW_TASK_CLOCK = 0x1
PERF_COUNT_SW_PAGE_FAULTS = 0x2
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9
PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2
PERF_SAMPLE_TIME = 0x4
PERF_SAMPLE_ADDR = 0x8
PERF_SAMPLE_READ = 0x10
PERF_SAMPLE_CALLCHAIN = 0x20
PERF_SAMPLE_ID = 0x40
PERF_SAMPLE_CPU = 0x80
PERF_SAMPLE_PERIOD = 0x100
PERF_SAMPLE_STREAM_ID = 0x200
PERF_SAMPLE_RAW = 0x400
PERF_SAMPLE_BRANCH_STACK = 0x800
PERF_SAMPLE_BRANCH_USER = 0x1
PERF_SAMPLE_BRANCH_KERNEL = 0x2
PERF_SAMPLE_BRANCH_HV = 0x4
PERF_SAMPLE_BRANCH_ANY = 0x8
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9
PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80
PERF_CONTEXT_USER = -0x200
PERF_CONTEXT_GUEST = -0x800
PERF_CONTEXT_GUEST_KERNEL = -0x880
PERF_CONTEXT_GUEST_USER = -0xa00
PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4
)
const (
CBitFieldMaskBit0 = 0x8000000000000000
CBitFieldMaskBit1 = 0x4000000000000000
@ -986,3 +1157,115 @@ const (
CBitFieldMaskBit62 = 0x2
CBitFieldMaskBit63 = 0x1
)
type SockaddrStorage struct {
Family uint16
_ [118]int8
_ uint64
}
type TCPMD5Sig struct {
Addr SockaddrStorage
Flags uint8
Prefixlen uint8
Keylen uint16
_ uint32
Key [80]uint8
}
type HDDriveCmdHdr struct {
Command uint8
Number uint8
Feature uint8
Count uint8
}
type HDGeometry struct {
Heads uint8
Sectors uint8
Cylinders uint16
_ [4]byte
Start uint64
}
type HDDriveID struct {
Config uint16
Cyls uint16
Reserved2 uint16
Heads uint16
Track_bytes uint16
Sector_bytes uint16
Sectors uint16
Vendor0 uint16
Vendor1 uint16
Vendor2 uint16
Serial_no [20]uint8
Buf_type uint16
Buf_size uint16
Ecc_bytes uint16
Fw_rev [8]uint8
Model [40]uint8
Max_multsect uint8
Vendor3 uint8
Dword_io uint16
Vendor4 uint8
Capability uint8
Reserved50 uint16
Vendor5 uint8
TPIO uint8
Vendor6 uint8
TDMA uint8
Field_valid uint16
Cur_cyls uint16
Cur_heads uint16
Cur_sectors uint16
Cur_capacity0 uint16
Cur_capacity1 uint16
Multsect uint8
Multsect_valid uint8
Lba_capacity uint32
Dma_1word uint16
Dma_mword uint16
Eide_pio_modes uint16
Eide_dma_min uint16
Eide_dma_time uint16
Eide_pio uint16
Eide_pio_iordy uint16
Words69_70 [2]uint16
Words71_74 [4]uint16
Queue_depth uint16
Words76_79 [4]uint16
Major_rev_num uint16
Minor_rev_num uint16
Command_set_1 uint16
Command_set_2 uint16
Cfsse uint16
Cfs_enable_1 uint16
Cfs_enable_2 uint16
Csf_default uint16
Dma_ultra uint16
Trseuc uint16
TrsEuc uint16
CurAPMvalues uint16
Mprc uint16
Hw_config uint16
Acoustic uint16
Msrqs uint16
Sxfert uint16
Sal uint16
Spg uint32
Lba_capacity_2 uint64
Words104_125 [22]uint16
Last_lun uint16
Word127 uint16
Dlf uint16
Csfo uint16
Words130_155 [26]uint16
Word156 uint16
Words157_159 [3]uint16
Cfa_power uint16
Words161_175 [15]uint16
Words176_205 [30]uint16
Words206_254 [49]uint16
Integrity_word uint16
}