mirror of https://github.com/knative/caching.git
upgrade to latest dependencies (#609)
bumping knative.dev/hack cf8cbc0...e178598: > e178598 Update community files (# 157) bumping knative.dev/pkg 80c511a...2fdd5f2: > 2fdd5f2 Update actions (# 2449) > 76a28b0 set git user name/email prior to merging upstream (# 2448) > fe26417 Allow overriding lease name for a reconciler (# 2435) > 9b5c411 allow overriding the default grace period of 45 seconds (# 2423) > 4c2331f Bump golang.org/x/crypto (# 2444) > 708dc1c Update community files (# 2443) > 062ca30 upgrade to latest dependencies (# 2433) > 4fcbc1b Update actions (# 2434) Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
parent
185df846cb
commit
08e34dbb9c
4
go.mod
4
go.mod
|
@ -10,6 +10,6 @@ require (
|
|||
k8s.io/client-go v0.22.5
|
||||
k8s.io/code-generator v0.22.5
|
||||
k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c
|
||||
knative.dev/hack v0.0.0-20220222192704-cf8cbc0e9165
|
||||
knative.dev/pkg v0.0.0-20220222211204-80c511aa340f
|
||||
knative.dev/hack v0.0.0-20220224013837-e1785985d364
|
||||
knative.dev/pkg v0.0.0-20220301181942-2fdd5f232e77
|
||||
)
|
||||
|
|
21
go.sum
21
go.sum
|
@ -614,6 +614,7 @@ golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPh
|
|||
golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
||||
golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
|
@ -701,8 +702,10 @@ golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qx
|
|||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
|
@ -802,12 +805,15 @@ golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||
golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 h1:TyHqChC80pFkXWraUUf6RuB5IqFdQieMLwwCJokV2pc=
|
||||
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 h1:nhht2DYV/Sn3qOayu8lM+cU1ii9sTLUeBQwQQfUHtrs=
|
||||
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
|
||||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
@ -1108,11 +1114,10 @@ k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c h1:jvamsI1tn9V0S8jicyX82q
|
|||
k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw=
|
||||
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a h1:8dYfu/Fc9Gz2rNJKB9IQRGgQOh2clmRzNIPPY1xLY5g=
|
||||
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
knative.dev/hack v0.0.0-20220216040439-0456e8bf6547/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
|
||||
knative.dev/hack v0.0.0-20220222192704-cf8cbc0e9165 h1:0d9rHKKWQnbOUUURb9rEOj7StoxLyAriHVIfhgumV9M=
|
||||
knative.dev/hack v0.0.0-20220222192704-cf8cbc0e9165/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
|
||||
knative.dev/pkg v0.0.0-20220222211204-80c511aa340f h1:tFkxKxsHZ8APM3a4x3/qWQJy25IC1MKs3ikmBhQokY8=
|
||||
knative.dev/pkg v0.0.0-20220222211204-80c511aa340f/go.mod h1:qymIihGpeunap7KEUhrKRcm0LjhkCjL+n7ryIx2kLH0=
|
||||
knative.dev/hack v0.0.0-20220224013837-e1785985d364 h1:wOysRDkzacHlM2OEQoM5ayNT+s/Zymzk5Tv17RL++3g=
|
||||
knative.dev/hack v0.0.0-20220224013837-e1785985d364/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
|
||||
knative.dev/pkg v0.0.0-20220301181942-2fdd5f232e77 h1:eIH936a0/1X/XQOMN9+O3fw9spGvOJiMVKsBuu8J47U=
|
||||
knative.dev/pkg v0.0.0-20220301181942-2fdd5f232e77/go.mod h1:SsH9J6Gz+CvrHmoL0TELJXmMmohqKSQ5bpJvCv+1+ZI=
|
||||
pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2021 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
package http2
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"net"
|
||||
)
|
||||
|
||||
func tlsUnderlyingConn(tc *tls.Conn) net.Conn {
|
||||
return tc.NetConn()
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2021 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !go1.18
|
||||
// +build !go1.18
|
||||
|
||||
package http2
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"net"
|
||||
)
|
||||
|
||||
func tlsUnderlyingConn(tc *tls.Conn) net.Conn {
|
||||
return nil
|
||||
}
|
|
@ -722,7 +722,7 @@ func (sc *serverConn) canonicalHeader(v string) string {
|
|||
// maxCachedCanonicalHeaders is an arbitrarily-chosen limit on the number of
|
||||
// entries in the canonHeader cache. This should be larger than the number
|
||||
// of unique, uncommon header keys likely to be sent by the peer, while not
|
||||
// so high as to permit unreaasonable memory usage if the peer sends an unbounded
|
||||
// so high as to permit unreasonable memory usage if the peer sends an unbounded
|
||||
// number of unique header keys.
|
||||
const maxCachedCanonicalHeaders = 32
|
||||
if len(sc.canonHeader) < maxCachedCanonicalHeaders {
|
||||
|
|
|
@ -735,7 +735,6 @@ func (cc *ClientConn) healthCheck() {
|
|||
err := cc.Ping(ctx)
|
||||
if err != nil {
|
||||
cc.closeForLostPing()
|
||||
cc.t.connPool().MarkDead(cc)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -907,6 +906,24 @@ func (cc *ClientConn) onIdleTimeout() {
|
|||
cc.closeIfIdle()
|
||||
}
|
||||
|
||||
func (cc *ClientConn) closeConn() error {
|
||||
t := time.AfterFunc(250*time.Millisecond, cc.forceCloseConn)
|
||||
defer t.Stop()
|
||||
return cc.tconn.Close()
|
||||
}
|
||||
|
||||
// A tls.Conn.Close can hang for a long time if the peer is unresponsive.
|
||||
// Try to shut it down more aggressively.
|
||||
func (cc *ClientConn) forceCloseConn() {
|
||||
tc, ok := cc.tconn.(*tls.Conn)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
if nc := tlsUnderlyingConn(tc); nc != nil {
|
||||
nc.Close()
|
||||
}
|
||||
}
|
||||
|
||||
func (cc *ClientConn) closeIfIdle() {
|
||||
cc.mu.Lock()
|
||||
if len(cc.streams) > 0 || cc.streamsReserved > 0 {
|
||||
|
@ -921,7 +938,7 @@ func (cc *ClientConn) closeIfIdle() {
|
|||
if VerboseLogs {
|
||||
cc.vlogf("http2: Transport closing idle conn %p (forSingleUse=%v, maxStream=%v)", cc, cc.singleUse, nextID-2)
|
||||
}
|
||||
cc.tconn.Close()
|
||||
cc.closeConn()
|
||||
}
|
||||
|
||||
func (cc *ClientConn) isDoNotReuseAndIdle() bool {
|
||||
|
@ -938,7 +955,7 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
|
|||
return err
|
||||
}
|
||||
// Wait for all in-flight streams to complete or connection to close
|
||||
done := make(chan error, 1)
|
||||
done := make(chan struct{})
|
||||
cancelled := false // guarded by cc.mu
|
||||
go func() {
|
||||
cc.mu.Lock()
|
||||
|
@ -946,7 +963,7 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
|
|||
for {
|
||||
if len(cc.streams) == 0 || cc.closed {
|
||||
cc.closed = true
|
||||
done <- cc.tconn.Close()
|
||||
close(done)
|
||||
break
|
||||
}
|
||||
if cancelled {
|
||||
|
@ -957,8 +974,8 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
|
|||
}()
|
||||
shutdownEnterWaitStateHook()
|
||||
select {
|
||||
case err := <-done:
|
||||
return err
|
||||
case <-done:
|
||||
return cc.closeConn()
|
||||
case <-ctx.Done():
|
||||
cc.mu.Lock()
|
||||
// Free the goroutine above
|
||||
|
@ -1001,9 +1018,9 @@ func (cc *ClientConn) closeForError(err error) error {
|
|||
for _, cs := range cc.streams {
|
||||
cs.abortStreamLocked(err)
|
||||
}
|
||||
defer cc.cond.Broadcast()
|
||||
defer cc.mu.Unlock()
|
||||
return cc.tconn.Close()
|
||||
cc.cond.Broadcast()
|
||||
cc.mu.Unlock()
|
||||
return cc.closeConn()
|
||||
}
|
||||
|
||||
// Close closes the client connection immediately.
|
||||
|
@ -1978,7 +1995,7 @@ func (cc *ClientConn) forgetStreamID(id uint32) {
|
|||
cc.vlogf("http2: Transport closing idle conn %p (forSingleUse=%v, maxStream=%v)", cc, cc.singleUse, cc.nextStreamID-2)
|
||||
}
|
||||
cc.closed = true
|
||||
defer cc.tconn.Close()
|
||||
defer cc.closeConn()
|
||||
}
|
||||
|
||||
cc.mu.Unlock()
|
||||
|
@ -2025,8 +2042,8 @@ func isEOFOrNetReadError(err error) bool {
|
|||
|
||||
func (rl *clientConnReadLoop) cleanup() {
|
||||
cc := rl.cc
|
||||
defer cc.tconn.Close()
|
||||
defer cc.t.connPool().MarkDead(cc)
|
||||
cc.t.connPool().MarkDead(cc)
|
||||
defer cc.closeConn()
|
||||
defer close(cc.readerDone)
|
||||
|
||||
if cc.idleTimer != nil {
|
||||
|
|
|
@ -132,8 +132,10 @@ func Pipe(p []int) (err error) {
|
|||
}
|
||||
var pp [2]int32
|
||||
err = pipe(&pp)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
if err == nil {
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -194,3 +194,26 @@ func ioctlIfreqData(fd int, req uint, value *ifreqData) error {
|
|||
// identical so pass *IfreqData directly.
|
||||
return ioctlPtr(fd, req, unsafe.Pointer(value))
|
||||
}
|
||||
|
||||
// IoctlKCMClone attaches a new file descriptor to a multiplexor by cloning an
|
||||
// existing KCM socket, returning a structure containing the file descriptor of
|
||||
// the new socket.
|
||||
func IoctlKCMClone(fd int) (*KCMClone, error) {
|
||||
var info KCMClone
|
||||
if err := ioctlPtr(fd, SIOCKCMCLONE, unsafe.Pointer(&info)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &info, nil
|
||||
}
|
||||
|
||||
// IoctlKCMAttach attaches a TCP socket and associated BPF program file
|
||||
// descriptor to a multiplexor.
|
||||
func IoctlKCMAttach(fd int, info KCMAttach) error {
|
||||
return ioctlPtr(fd, SIOCKCMATTACH, unsafe.Pointer(&info))
|
||||
}
|
||||
|
||||
// IoctlKCMUnattach unattaches a TCP socket file descriptor from a multiplexor.
|
||||
func IoctlKCMUnattach(fd int, info KCMUnattach) error {
|
||||
return ioctlPtr(fd, SIOCKCMUNATTACH, unsafe.Pointer(&info))
|
||||
}
|
||||
|
|
|
@ -205,6 +205,7 @@ struct ltchars {
|
|||
#include <linux/bpf.h>
|
||||
#include <linux/can.h>
|
||||
#include <linux/can/error.h>
|
||||
#include <linux/can/netlink.h>
|
||||
#include <linux/can/raw.h>
|
||||
#include <linux/capability.h>
|
||||
#include <linux/cryptouser.h>
|
||||
|
@ -231,6 +232,7 @@ struct ltchars {
|
|||
#include <linux/if_packet.h>
|
||||
#include <linux/if_xdp.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/kcm.h>
|
||||
#include <linux/kexec.h>
|
||||
#include <linux/keyctl.h>
|
||||
#include <linux/landlock.h>
|
||||
|
@ -261,6 +263,7 @@ struct ltchars {
|
|||
#include <linux/vm_sockets.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/watchdog.h>
|
||||
#include <linux/wireguard.h>
|
||||
|
||||
#include <mtd/ubi-user.h>
|
||||
#include <mtd/mtd-user.h>
|
||||
|
@ -502,6 +505,7 @@ ccflags="$@"
|
|||
$2 ~ /^O?XTABS$/ ||
|
||||
$2 ~ /^TC[IO](ON|OFF)$/ ||
|
||||
$2 ~ /^IN_/ ||
|
||||
$2 ~ /^KCM/ ||
|
||||
$2 ~ /^LANDLOCK_/ ||
|
||||
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
|
||||
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
|
||||
|
@ -596,6 +600,7 @@ ccflags="$@"
|
|||
$2 ~ /^DEVLINK_/ ||
|
||||
$2 ~ /^ETHTOOL_/ ||
|
||||
$2 ~ /^LWTUNNEL_IP/ ||
|
||||
$2 ~ /^ITIMER_/ ||
|
||||
$2 !~ "WMESGLEN" &&
|
||||
$2 ~ /^W[A-Z0-9]+$/ ||
|
||||
$2 ~/^PPPIOC/ ||
|
||||
|
@ -606,6 +611,7 @@ ccflags="$@"
|
|||
$2 ~ /^MTD/ ||
|
||||
$2 ~ /^OTP/ ||
|
||||
$2 ~ /^MEM/ ||
|
||||
$2 ~ /^WG/ ||
|
||||
$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
|
||||
$2 ~ /^__WCOREFLAG$/ {next}
|
||||
$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
|
||||
|
|
|
@ -519,8 +519,10 @@ func Pipe(p []int) (err error) {
|
|||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe(&pp)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
if err == nil {
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -159,8 +159,10 @@ func Pipe(p []int) (err error) {
|
|||
}
|
||||
var x [2]int32
|
||||
err = pipe(&x)
|
||||
p[0] = int(x[0])
|
||||
p[1] = int(x[1])
|
||||
if err == nil {
|
||||
p[0] = int(x[0])
|
||||
p[1] = int(x[1])
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,10 @@ func Pipe(p []int) (err error) {
|
|||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
p[0], p[1], err = pipe()
|
||||
r, w, err := pipe()
|
||||
if err == nil {
|
||||
p[0], p[1] = r, w
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -114,7 +117,10 @@ func Pipe2(p []int, flags int) (err error) {
|
|||
var pp [2]_C_int
|
||||
// pipe2 on dragonfly takes an fds array as an argument, but still
|
||||
// returns the file descriptors.
|
||||
p[0], p[1], err = pipe2(&pp, flags)
|
||||
r, w, err := pipe2(&pp, flags)
|
||||
if err == nil {
|
||||
p[0], p[1] = r, w
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -110,8 +110,10 @@ func Pipe2(p []int, flags int) error {
|
|||
}
|
||||
var pp [2]_C_int
|
||||
err := pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
if err == nil {
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ package unix
|
|||
import (
|
||||
"encoding/binary"
|
||||
"syscall"
|
||||
"time"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -131,8 +132,10 @@ func Pipe2(p []int, flags int) error {
|
|||
}
|
||||
var pp [2]_C_int
|
||||
err := pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
if err == nil {
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -247,6 +250,13 @@ func Getwd() (wd string, err error) {
|
|||
if n < 1 || n > len(buf) || buf[n-1] != 0 {
|
||||
return "", EINVAL
|
||||
}
|
||||
// In some cases, Linux can return a path that starts with the
|
||||
// "(unreachable)" prefix, which can potentially be a valid relative
|
||||
// path. To work around that, return ENOENT if path is not absolute.
|
||||
if buf[0] != '/' {
|
||||
return "", ENOENT
|
||||
}
|
||||
|
||||
return string(buf[0 : n-1]), nil
|
||||
}
|
||||
|
||||
|
@ -2312,11 +2322,56 @@ type RemoteIovec struct {
|
|||
//sys shmdt(addr uintptr) (err error)
|
||||
//sys shmget(key int, size int, flag int) (id int, err error)
|
||||
|
||||
//sys getitimer(which int, currValue *Itimerval) (err error)
|
||||
//sys setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error)
|
||||
|
||||
// MakeItimerval creates an Itimerval from interval and value durations.
|
||||
func MakeItimerval(interval, value time.Duration) Itimerval {
|
||||
return Itimerval{
|
||||
Interval: NsecToTimeval(interval.Nanoseconds()),
|
||||
Value: NsecToTimeval(value.Nanoseconds()),
|
||||
}
|
||||
}
|
||||
|
||||
// A value which may be passed to the which parameter for Getitimer and
|
||||
// Setitimer.
|
||||
type ItimerWhich int
|
||||
|
||||
// Possible which values for Getitimer and Setitimer.
|
||||
const (
|
||||
ItimerReal ItimerWhich = ITIMER_REAL
|
||||
ItimerVirtual ItimerWhich = ITIMER_VIRTUAL
|
||||
ItimerProf ItimerWhich = ITIMER_PROF
|
||||
)
|
||||
|
||||
// Getitimer wraps getitimer(2) to return the current value of the timer
|
||||
// specified by which.
|
||||
func Getitimer(which ItimerWhich) (Itimerval, error) {
|
||||
var it Itimerval
|
||||
if err := getitimer(int(which), &it); err != nil {
|
||||
return Itimerval{}, err
|
||||
}
|
||||
|
||||
return it, nil
|
||||
}
|
||||
|
||||
// Setitimer wraps setitimer(2) to arm or disarm the timer specified by which.
|
||||
// It returns the previous value of the timer.
|
||||
//
|
||||
// If the Itimerval argument is the zero value, the timer will be disarmed.
|
||||
func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
|
||||
var prev Itimerval
|
||||
if err := setitimer(int(which), &it, &prev); err != nil {
|
||||
return Itimerval{}, err
|
||||
}
|
||||
|
||||
return prev, nil
|
||||
}
|
||||
|
||||
/*
|
||||
* Unimplemented
|
||||
*/
|
||||
// AfsSyscall
|
||||
// Alarm
|
||||
// ArchPrctl
|
||||
// Brk
|
||||
// ClockNanosleep
|
||||
|
@ -2332,7 +2387,6 @@ type RemoteIovec struct {
|
|||
// GetMempolicy
|
||||
// GetRobustList
|
||||
// GetThreadArea
|
||||
// Getitimer
|
||||
// Getpmsg
|
||||
// IoCancel
|
||||
// IoDestroy
|
||||
|
|
|
@ -173,14 +173,6 @@ const (
|
|||
_SENDMMSG = 20
|
||||
)
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
fd, e := socketcall(_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
|
||||
if e != 0 {
|
||||
err = e
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
fd, e := socketcall(_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
if e != 0 {
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright 2022 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64)
|
||||
// +build linux
|
||||
// +build 386 amd64 mips mipsle mips64 mipsle ppc64 ppc64le ppc s390x sparc64
|
||||
|
||||
package unix
|
||||
|
||||
// SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH
|
||||
// values.
|
||||
|
||||
//sys Alarm(seconds uint) (remaining uint, err error)
|
|
@ -62,7 +62,6 @@ func Stat(path string, stat *Stat_t) (err error) {
|
|||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
@ -27,7 +27,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
|||
return newoffset, nil
|
||||
}
|
||||
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
@ -66,7 +66,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
return ENOSYS
|
||||
}
|
||||
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
@ -48,7 +48,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
|||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
@ -41,7 +41,6 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
|||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
|
||||
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
@ -43,7 +43,6 @@ import (
|
|||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
||||
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
|
||||
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
@ -45,7 +45,6 @@ package unix
|
|||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
@ -65,7 +65,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
return ENOSYS
|
||||
}
|
||||
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
@ -145,15 +145,6 @@ const (
|
|||
netSendMMsg = 20
|
||||
)
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (int, error) {
|
||||
args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
|
||||
fd, _, err := Syscall(SYS_SOCKETCALL, netAccept, uintptr(unsafe.Pointer(&args)), 0)
|
||||
if err != 0 {
|
||||
return 0, err
|
||||
}
|
||||
return int(fd), nil
|
||||
}
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (int, error) {
|
||||
args := [4]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)}
|
||||
fd, _, err := Syscall(SYS_SOCKETCALL, netAccept4, uintptr(unsafe.Pointer(&args)), 0)
|
||||
|
|
|
@ -42,7 +42,6 @@ package unix
|
|||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
|
|
|
@ -110,14 +110,8 @@ func direntNamlen(buf []byte) (uint64, bool) {
|
|||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
//sysnb pipe() (fd1 int, fd2 int, err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
p[0], p[1], err = pipe()
|
||||
return
|
||||
return Pipe2(p, 0)
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
@ -128,8 +122,10 @@ func Pipe2(p []int, flags int) error {
|
|||
}
|
||||
var pp [2]_C_int
|
||||
err := pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
if err == nil {
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -87,8 +87,10 @@ func Pipe2(p []int, flags int) error {
|
|||
}
|
||||
var pp [2]_C_int
|
||||
err := pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
if err == nil {
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -66,8 +66,10 @@ func Pipe(p []int) (err error) {
|
|||
if n != 0 {
|
||||
return err
|
||||
}
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
if err == nil {
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -79,8 +81,10 @@ func Pipe2(p []int, flags int) error {
|
|||
}
|
||||
var pp [2]_C_int
|
||||
err := pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
if err == nil {
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -579,8 +579,10 @@ func Pipe(p []int) (err error) {
|
|||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe(&pp)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
if err == nil {
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,8 @@ const (
|
|||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2d
|
||||
AF_MAX = 0x2e
|
||||
AF_MCTP = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
|
@ -259,6 +260,17 @@ const (
|
|||
BUS_USB = 0x3
|
||||
BUS_VIRTUAL = 0x6
|
||||
CAN_BCM = 0x2
|
||||
CAN_CTRLMODE_3_SAMPLES = 0x4
|
||||
CAN_CTRLMODE_BERR_REPORTING = 0x10
|
||||
CAN_CTRLMODE_CC_LEN8_DLC = 0x100
|
||||
CAN_CTRLMODE_FD = 0x20
|
||||
CAN_CTRLMODE_FD_NON_ISO = 0x80
|
||||
CAN_CTRLMODE_LISTENONLY = 0x2
|
||||
CAN_CTRLMODE_LOOPBACK = 0x1
|
||||
CAN_CTRLMODE_ONE_SHOT = 0x8
|
||||
CAN_CTRLMODE_PRESUME_ACK = 0x40
|
||||
CAN_CTRLMODE_TDC_AUTO = 0x200
|
||||
CAN_CTRLMODE_TDC_MANUAL = 0x400
|
||||
CAN_EFF_FLAG = 0x80000000
|
||||
CAN_EFF_ID_BITS = 0x1d
|
||||
CAN_EFF_MASK = 0x1fffffff
|
||||
|
@ -336,6 +348,7 @@ const (
|
|||
CAN_RTR_FLAG = 0x40000000
|
||||
CAN_SFF_ID_BITS = 0xb
|
||||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TERMINATION_DISABLED = 0x0
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CAP_AUDIT_CONTROL = 0x1e
|
||||
|
@ -741,6 +754,7 @@ const (
|
|||
ETH_P_QINQ2 = 0x9200
|
||||
ETH_P_QINQ3 = 0x9300
|
||||
ETH_P_RARP = 0x8035
|
||||
ETH_P_REALTEK = 0x8899
|
||||
ETH_P_SCA = 0x6007
|
||||
ETH_P_SLOW = 0x8809
|
||||
ETH_P_SNAP = 0x5
|
||||
|
@ -810,10 +824,12 @@ const (
|
|||
FAN_EPIDFD = -0x2
|
||||
FAN_EVENT_INFO_TYPE_DFID = 0x3
|
||||
FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
|
||||
FAN_EVENT_INFO_TYPE_ERROR = 0x5
|
||||
FAN_EVENT_INFO_TYPE_FID = 0x1
|
||||
FAN_EVENT_INFO_TYPE_PIDFD = 0x4
|
||||
FAN_EVENT_METADATA_LEN = 0x18
|
||||
FAN_EVENT_ON_CHILD = 0x8000000
|
||||
FAN_FS_ERROR = 0x8000
|
||||
FAN_MARK_ADD = 0x1
|
||||
FAN_MARK_DONT_FOLLOW = 0x4
|
||||
FAN_MARK_FILESYSTEM = 0x100
|
||||
|
@ -1264,9 +1280,14 @@ const (
|
|||
IP_XFRM_POLICY = 0x11
|
||||
ISOFS_SUPER_MAGIC = 0x9660
|
||||
ISTRIP = 0x20
|
||||
ITIMER_PROF = 0x2
|
||||
ITIMER_REAL = 0x0
|
||||
ITIMER_VIRTUAL = 0x1
|
||||
IUTF8 = 0x4000
|
||||
IXANY = 0x800
|
||||
JFFS2_SUPER_MAGIC = 0x72b6
|
||||
KCMPROTO_CONNECTED = 0x0
|
||||
KCM_RECV_DISABLE = 0x1
|
||||
KEXEC_ARCH_386 = 0x30000
|
||||
KEXEC_ARCH_68K = 0x40000
|
||||
KEXEC_ARCH_AARCH64 = 0xb70000
|
||||
|
@ -1827,6 +1848,8 @@ const (
|
|||
PERF_MEM_BLK_DATA = 0x2
|
||||
PERF_MEM_BLK_NA = 0x1
|
||||
PERF_MEM_BLK_SHIFT = 0x28
|
||||
PERF_MEM_HOPS_0 = 0x1
|
||||
PERF_MEM_HOPS_SHIFT = 0x2b
|
||||
PERF_MEM_LOCK_LOCKED = 0x2
|
||||
PERF_MEM_LOCK_NA = 0x1
|
||||
PERF_MEM_LOCK_SHIFT = 0x18
|
||||
|
@ -1986,6 +2009,9 @@ const (
|
|||
PR_SCHED_CORE_CREATE = 0x1
|
||||
PR_SCHED_CORE_GET = 0x0
|
||||
PR_SCHED_CORE_MAX = 0x4
|
||||
PR_SCHED_CORE_SCOPE_PROCESS_GROUP = 0x2
|
||||
PR_SCHED_CORE_SCOPE_THREAD = 0x0
|
||||
PR_SCHED_CORE_SCOPE_THREAD_GROUP = 0x1
|
||||
PR_SCHED_CORE_SHARE_FROM = 0x3
|
||||
PR_SCHED_CORE_SHARE_TO = 0x2
|
||||
PR_SET_CHILD_SUBREAPER = 0x24
|
||||
|
@ -2167,12 +2193,23 @@ const (
|
|||
RTCF_NAT = 0x800000
|
||||
RTCF_VALVE = 0x200000
|
||||
RTC_AF = 0x20
|
||||
RTC_BSM_DIRECT = 0x1
|
||||
RTC_BSM_DISABLED = 0x0
|
||||
RTC_BSM_LEVEL = 0x2
|
||||
RTC_BSM_STANDBY = 0x3
|
||||
RTC_FEATURE_ALARM = 0x0
|
||||
RTC_FEATURE_ALARM_RES_2S = 0x3
|
||||
RTC_FEATURE_ALARM_RES_MINUTE = 0x1
|
||||
RTC_FEATURE_CNT = 0x3
|
||||
RTC_FEATURE_BACKUP_SWITCH_MODE = 0x6
|
||||
RTC_FEATURE_CNT = 0x7
|
||||
RTC_FEATURE_CORRECTION = 0x5
|
||||
RTC_FEATURE_NEED_WEEK_DAY = 0x2
|
||||
RTC_FEATURE_UPDATE_INTERRUPT = 0x4
|
||||
RTC_IRQF = 0x80
|
||||
RTC_MAX_FREQ = 0x2000
|
||||
RTC_PARAM_BACKUP_SWITCH_MODE = 0x2
|
||||
RTC_PARAM_CORRECTION = 0x1
|
||||
RTC_PARAM_FEATURES = 0x0
|
||||
RTC_PF = 0x40
|
||||
RTC_UF = 0x10
|
||||
RTF_ADDRCLASSMASK = 0xf8000000
|
||||
|
@ -2423,6 +2460,9 @@ const (
|
|||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCGSTAMPNS_OLD = 0x8907
|
||||
SIOCGSTAMP_OLD = 0x8906
|
||||
SIOCKCMATTACH = 0x89e0
|
||||
SIOCKCMCLONE = 0x89e2
|
||||
SIOCKCMUNATTACH = 0x89e1
|
||||
SIOCOUTQNSD = 0x894b
|
||||
SIOCPROTOPRIVATE = 0x89e0
|
||||
SIOCRTMSG = 0x890d
|
||||
|
@ -2532,6 +2572,8 @@ const (
|
|||
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||
SO_VM_SOCKETS_CONNECT_TIMEOUT_NEW = 0x8
|
||||
SO_VM_SOCKETS_CONNECT_TIMEOUT_OLD = 0x6
|
||||
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||
|
@ -2826,6 +2868,13 @@ const (
|
|||
WDIOS_TEMPPANIC = 0x4
|
||||
WDIOS_UNKNOWN = -0x1
|
||||
WEXITED = 0x4
|
||||
WGALLOWEDIP_A_MAX = 0x3
|
||||
WGDEVICE_A_MAX = 0x8
|
||||
WGPEER_A_MAX = 0xa
|
||||
WG_CMD_MAX = 0x1
|
||||
WG_GENL_NAME = "wireguard"
|
||||
WG_GENL_VERSION = 0x1
|
||||
WG_KEY_LEN = 0x20
|
||||
WIN_ACKMEDIACHANGE = 0xdb
|
||||
WIN_CHECKPOWERMODE1 = 0xe5
|
||||
WIN_CHECKPOWERMODE2 = 0x98
|
||||
|
|
|
@ -250,6 +250,8 @@ const (
|
|||
RTC_EPOCH_SET = 0x4004700e
|
||||
RTC_IRQP_READ = 0x8004700b
|
||||
RTC_IRQP_SET = 0x4004700c
|
||||
RTC_PARAM_GET = 0x40187013
|
||||
RTC_PARAM_SET = 0x40187014
|
||||
RTC_PIE_OFF = 0x7006
|
||||
RTC_PIE_ON = 0x7005
|
||||
RTC_PLL_GET = 0x801c7011
|
||||
|
@ -327,6 +329,7 @@ const (
|
|||
SO_RCVTIMEO = 0x14
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x14
|
||||
SO_RESERVE_MEM = 0x49
|
||||
SO_REUSEADDR = 0x2
|
||||
SO_REUSEPORT = 0xf
|
||||
SO_RXQ_OVFL = 0x28
|
||||
|
|
|
@ -251,6 +251,8 @@ const (
|
|||
RTC_EPOCH_SET = 0x4008700e
|
||||
RTC_IRQP_READ = 0x8008700b
|
||||
RTC_IRQP_SET = 0x4008700c
|
||||
RTC_PARAM_GET = 0x40187013
|
||||
RTC_PARAM_SET = 0x40187014
|
||||
RTC_PIE_OFF = 0x7006
|
||||
RTC_PIE_ON = 0x7005
|
||||
RTC_PLL_GET = 0x80207011
|
||||
|
@ -328,6 +330,7 @@ const (
|
|||
SO_RCVTIMEO = 0x14
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x14
|
||||
SO_RESERVE_MEM = 0x49
|
||||
SO_REUSEADDR = 0x2
|
||||
SO_REUSEPORT = 0xf
|
||||
SO_RXQ_OVFL = 0x28
|
||||
|
|
|
@ -257,6 +257,8 @@ const (
|
|||
RTC_EPOCH_SET = 0x4004700e
|
||||
RTC_IRQP_READ = 0x8004700b
|
||||
RTC_IRQP_SET = 0x4004700c
|
||||
RTC_PARAM_GET = 0x40187013
|
||||
RTC_PARAM_SET = 0x40187014
|
||||
RTC_PIE_OFF = 0x7006
|
||||
RTC_PIE_ON = 0x7005
|
||||
RTC_PLL_GET = 0x801c7011
|
||||
|
@ -334,6 +336,7 @@ const (
|
|||
SO_RCVTIMEO = 0x14
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x14
|
||||
SO_RESERVE_MEM = 0x49
|
||||
SO_REUSEADDR = 0x2
|
||||
SO_REUSEPORT = 0xf
|
||||
SO_RXQ_OVFL = 0x28
|
||||
|
|
|
@ -247,6 +247,8 @@ const (
|
|||
RTC_EPOCH_SET = 0x4008700e
|
||||
RTC_IRQP_READ = 0x8008700b
|
||||
RTC_IRQP_SET = 0x4008700c
|
||||
RTC_PARAM_GET = 0x40187013
|
||||
RTC_PARAM_SET = 0x40187014
|
||||
RTC_PIE_OFF = 0x7006
|
||||
RTC_PIE_ON = 0x7005
|
||||
RTC_PLL_GET = 0x80207011
|
||||
|
@ -324,6 +326,7 @@ const (
|
|||
SO_RCVTIMEO = 0x14
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x14
|
||||
SO_RESERVE_MEM = 0x49
|
||||
SO_REUSEADDR = 0x2
|
||||
SO_REUSEPORT = 0xf
|
||||
SO_RXQ_OVFL = 0x28
|
||||
|
|
|
@ -250,6 +250,8 @@ const (
|
|||
RTC_EPOCH_SET = 0x8004700e
|
||||
RTC_IRQP_READ = 0x4004700b
|
||||
RTC_IRQP_SET = 0x8004700c
|
||||
RTC_PARAM_GET = 0x80187013
|
||||
RTC_PARAM_SET = 0x80187014
|
||||
RTC_PIE_OFF = 0x20007006
|
||||
RTC_PIE_ON = 0x20007005
|
||||
RTC_PLL_GET = 0x401c7011
|
||||
|
@ -327,6 +329,7 @@ const (
|
|||
SO_RCVTIMEO = 0x1006
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x1006
|
||||
SO_RESERVE_MEM = 0x49
|
||||
SO_REUSEADDR = 0x4
|
||||
SO_REUSEPORT = 0x200
|
||||
SO_RXQ_OVFL = 0x28
|
||||
|
|
|
@ -250,6 +250,8 @@ const (
|
|||
RTC_EPOCH_SET = 0x8008700e
|
||||
RTC_IRQP_READ = 0x4008700b
|
||||
RTC_IRQP_SET = 0x8008700c
|
||||
RTC_PARAM_GET = 0x80187013
|
||||
RTC_PARAM_SET = 0x80187014
|
||||
RTC_PIE_OFF = 0x20007006
|
||||
RTC_PIE_ON = 0x20007005
|
||||
RTC_PLL_GET = 0x40207011
|
||||
|
@ -327,6 +329,7 @@ const (
|
|||
SO_RCVTIMEO = 0x1006
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x1006
|
||||
SO_RESERVE_MEM = 0x49
|
||||
SO_REUSEADDR = 0x4
|
||||
SO_REUSEPORT = 0x200
|
||||
SO_RXQ_OVFL = 0x28
|
||||
|
|
|
@ -250,6 +250,8 @@ const (
|
|||
RTC_EPOCH_SET = 0x8008700e
|
||||
RTC_IRQP_READ = 0x4008700b
|
||||
RTC_IRQP_SET = 0x8008700c
|
||||
RTC_PARAM_GET = 0x80187013
|
||||
RTC_PARAM_SET = 0x80187014
|
||||
RTC_PIE_OFF = 0x20007006
|
||||
RTC_PIE_ON = 0x20007005
|
||||
RTC_PLL_GET = 0x40207011
|
||||
|
@ -327,6 +329,7 @@ const (
|
|||
SO_RCVTIMEO = 0x1006
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x1006
|
||||
SO_RESERVE_MEM = 0x49
|
||||
SO_REUSEADDR = 0x4
|
||||
SO_REUSEPORT = 0x200
|
||||
SO_RXQ_OVFL = 0x28
|
||||
|
|
|
@ -250,6 +250,8 @@ const (
|
|||
RTC_EPOCH_SET = 0x8004700e
|
||||
RTC_IRQP_READ = 0x4004700b
|
||||
RTC_IRQP_SET = 0x8004700c
|
||||
RTC_PARAM_GET = 0x80187013
|
||||
RTC_PARAM_SET = 0x80187014
|
||||
RTC_PIE_OFF = 0x20007006
|
||||
RTC_PIE_ON = 0x20007005
|
||||
RTC_PLL_GET = 0x401c7011
|
||||
|
@ -327,6 +329,7 @@ const (
|
|||
SO_RCVTIMEO = 0x1006
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x1006
|
||||
SO_RESERVE_MEM = 0x49
|
||||
SO_REUSEADDR = 0x4
|
||||
SO_REUSEPORT = 0x200
|
||||
SO_RXQ_OVFL = 0x28
|
||||
|
|
|
@ -305,6 +305,8 @@ const (
|
|||
RTC_EPOCH_SET = 0x8004700e
|
||||
RTC_IRQP_READ = 0x4004700b
|
||||
RTC_IRQP_SET = 0x8004700c
|
||||
RTC_PARAM_GET = 0x80187013
|
||||
RTC_PARAM_SET = 0x80187014
|
||||
RTC_PIE_OFF = 0x20007006
|
||||
RTC_PIE_ON = 0x20007005
|
||||
RTC_PLL_GET = 0x401c7011
|
||||
|
@ -382,6 +384,7 @@ const (
|
|||
SO_RCVTIMEO = 0x12
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x12
|
||||
SO_RESERVE_MEM = 0x49
|
||||
SO_REUSEADDR = 0x2
|
||||
SO_REUSEPORT = 0xf
|
||||
SO_RXQ_OVFL = 0x28
|
||||
|
|
|
@ -309,6 +309,8 @@ const (
|
|||
RTC_EPOCH_SET = 0x8008700e
|
||||
RTC_IRQP_READ = 0x4008700b
|
||||
RTC_IRQP_SET = 0x8008700c
|
||||
RTC_PARAM_GET = 0x80187013
|
||||
RTC_PARAM_SET = 0x80187014
|
||||
RTC_PIE_OFF = 0x20007006
|
||||
RTC_PIE_ON = 0x20007005
|
||||
RTC_PLL_GET = 0x40207011
|
||||
|
@ -386,6 +388,7 @@ const (
|
|||
SO_RCVTIMEO = 0x12
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x12
|
||||
SO_RESERVE_MEM = 0x49
|
||||
SO_REUSEADDR = 0x2
|
||||
SO_REUSEPORT = 0xf
|
||||
SO_RXQ_OVFL = 0x28
|
||||
|
|
|
@ -309,6 +309,8 @@ const (
|
|||
RTC_EPOCH_SET = 0x8008700e
|
||||
RTC_IRQP_READ = 0x4008700b
|
||||
RTC_IRQP_SET = 0x8008700c
|
||||
RTC_PARAM_GET = 0x80187013
|
||||
RTC_PARAM_SET = 0x80187014
|
||||
RTC_PIE_OFF = 0x20007006
|
||||
RTC_PIE_ON = 0x20007005
|
||||
RTC_PLL_GET = 0x40207011
|
||||
|
@ -386,6 +388,7 @@ const (
|
|||
SO_RCVTIMEO = 0x12
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x12
|
||||
SO_RESERVE_MEM = 0x49
|
||||
SO_REUSEADDR = 0x2
|
||||
SO_REUSEPORT = 0xf
|
||||
SO_RXQ_OVFL = 0x28
|
||||
|
|
|
@ -238,6 +238,8 @@ const (
|
|||
RTC_EPOCH_SET = 0x4008700e
|
||||
RTC_IRQP_READ = 0x8008700b
|
||||
RTC_IRQP_SET = 0x4008700c
|
||||
RTC_PARAM_GET = 0x40187013
|
||||
RTC_PARAM_SET = 0x40187014
|
||||
RTC_PIE_OFF = 0x7006
|
||||
RTC_PIE_ON = 0x7005
|
||||
RTC_PLL_GET = 0x80207011
|
||||
|
@ -315,6 +317,7 @@ const (
|
|||
SO_RCVTIMEO = 0x14
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x14
|
||||
SO_RESERVE_MEM = 0x49
|
||||
SO_REUSEADDR = 0x2
|
||||
SO_REUSEPORT = 0xf
|
||||
SO_RXQ_OVFL = 0x28
|
||||
|
|
|
@ -313,6 +313,8 @@ const (
|
|||
RTC_EPOCH_SET = 0x4008700e
|
||||
RTC_IRQP_READ = 0x8008700b
|
||||
RTC_IRQP_SET = 0x4008700c
|
||||
RTC_PARAM_GET = 0x40187013
|
||||
RTC_PARAM_SET = 0x40187014
|
||||
RTC_PIE_OFF = 0x7006
|
||||
RTC_PIE_ON = 0x7005
|
||||
RTC_PLL_GET = 0x80207011
|
||||
|
@ -390,6 +392,7 @@ const (
|
|||
SO_RCVTIMEO = 0x14
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x14
|
||||
SO_RESERVE_MEM = 0x49
|
||||
SO_REUSEADDR = 0x2
|
||||
SO_REUSEPORT = 0xf
|
||||
SO_RXQ_OVFL = 0x28
|
||||
|
|
|
@ -304,6 +304,8 @@ const (
|
|||
RTC_EPOCH_SET = 0x8008700e
|
||||
RTC_IRQP_READ = 0x4008700b
|
||||
RTC_IRQP_SET = 0x8008700c
|
||||
RTC_PARAM_GET = 0x80187013
|
||||
RTC_PARAM_SET = 0x80187014
|
||||
RTC_PIE_OFF = 0x20007006
|
||||
RTC_PIE_ON = 0x20007005
|
||||
RTC_PLL_GET = 0x40207011
|
||||
|
@ -381,6 +383,7 @@ const (
|
|||
SO_RCVTIMEO = 0x2000
|
||||
SO_RCVTIMEO_NEW = 0x44
|
||||
SO_RCVTIMEO_OLD = 0x2000
|
||||
SO_RESERVE_MEM = 0x52
|
||||
SO_REUSEADDR = 0x4
|
||||
SO_REUSEPORT = 0x200
|
||||
SO_RXQ_OVFL = 0x24
|
||||
|
|
|
@ -2032,3 +2032,23 @@ func shmget(key int, size int, flag int) (id int, err error) {
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getitimer(which int, currValue *Itimerval) (err error) {
|
||||
_, _, e1 := Syscall(SYS_GETITIMER, uintptr(which), uintptr(unsafe.Pointer(currValue)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETITIMER, uintptr(which), uintptr(unsafe.Pointer(newValue)), uintptr(unsafe.Pointer(oldValue)))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go
|
||||
// go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go syscall_linux_alarm.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build linux && 386
|
||||
|
@ -524,3 +524,14 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Alarm(seconds uint) (remaining uint, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||
remaining = uint(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go
|
||||
// go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go syscall_linux_alarm.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build linux && amd64
|
||||
|
@ -444,17 +444,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
@ -691,3 +680,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Alarm(seconds uint) (remaining uint, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||
remaining = uint(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -46,17 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
|
|
@ -389,17 +389,6 @@ func Truncate(path string, length int64) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run mksyscall.go -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go
|
||||
// go run mksyscall.go -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go syscall_linux_alarm.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build linux && mips
|
||||
|
@ -344,17 +344,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
@ -702,3 +691,14 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Alarm(seconds uint) (remaining uint, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||
remaining = uint(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run mksyscall.go -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go
|
||||
// go run mksyscall.go -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go syscall_linux_alarm.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build linux && mips64
|
||||
|
@ -399,17 +399,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
@ -696,3 +685,14 @@ func stat(path string, st *stat_t) (err error) {
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Alarm(seconds uint) (remaining uint, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||
remaining = uint(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -399,17 +399,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run mksyscall.go -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go
|
||||
// go run mksyscall.go -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go syscall_linux_alarm.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build linux && mipsle
|
||||
|
@ -344,17 +344,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
@ -702,3 +691,14 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Alarm(seconds uint) (remaining uint, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||
remaining = uint(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run mksyscall.go -b32 -tags linux,ppc syscall_linux.go syscall_linux_ppc.go
|
||||
// go run mksyscall.go -b32 -tags linux,ppc syscall_linux.go syscall_linux_ppc.go syscall_linux_alarm.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build linux && ppc
|
||||
|
@ -409,17 +409,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
@ -707,3 +696,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Alarm(seconds uint) (remaining uint, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||
remaining = uint(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run mksyscall.go -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go
|
||||
// go run mksyscall.go -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go syscall_linux_alarm.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build linux && ppc64
|
||||
|
@ -475,17 +475,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
@ -753,3 +742,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Alarm(seconds uint) (remaining uint, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||
remaining = uint(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go
|
||||
// go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go syscall_linux_alarm.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build linux && ppc64le
|
||||
|
@ -475,17 +475,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
@ -753,3 +742,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Alarm(seconds uint) (remaining uint, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||
remaining = uint(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -369,17 +369,6 @@ func Truncate(path string, length int64) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run mksyscall.go -tags linux,s390x syscall_linux.go syscall_linux_s390x.go
|
||||
// go run mksyscall.go -tags linux,s390x syscall_linux.go syscall_linux_s390x.go syscall_linux_alarm.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build linux && s390x
|
||||
|
@ -533,3 +533,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Alarm(seconds uint) (remaining uint, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||
remaining = uint(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go
|
||||
// go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go syscall_linux_alarm.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build linux && sparc64
|
||||
|
@ -455,17 +455,6 @@ func Truncate(path string, length int64) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
||||
fd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
|
||||
fd = int(r0)
|
||||
|
@ -697,3 +686,14 @@ func utimes(path string, times *[2]Timeval) (err error) {
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Alarm(seconds uint) (remaining uint, err error) {
|
||||
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
|
||||
remaining = uint(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -351,18 +351,6 @@ func Munlockall() (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe() (fd1 int, fd2 int, err error) {
|
||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||
fd1 = int(r0)
|
||||
fd2 = int(r1)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -351,18 +351,6 @@ func Munlockall() (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe() (fd1 int, fd2 int, err error) {
|
||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||
fd1 = int(r0)
|
||||
fd2 = int(r1)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -351,18 +351,6 @@ func Munlockall() (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe() (fd1 int, fd2 int, err error) {
|
||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||
fd1 = int(r0)
|
||||
fd2 = int(r1)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -351,18 +351,6 @@ func Munlockall() (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe() (fd1 int, fd2 int, err error) {
|
||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||
fd1 = int(r0)
|
||||
fd2 = int(r1)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -445,4 +445,5 @@ const (
|
|||
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||
SYS_MEMFD_SECRET = 447
|
||||
SYS_PROCESS_MRELEASE = 448
|
||||
SYS_FUTEX_WAITV = 449
|
||||
)
|
||||
|
|
|
@ -367,4 +367,5 @@ const (
|
|||
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||
SYS_MEMFD_SECRET = 447
|
||||
SYS_PROCESS_MRELEASE = 448
|
||||
SYS_FUTEX_WAITV = 449
|
||||
)
|
||||
|
|
|
@ -409,4 +409,5 @@ const (
|
|||
SYS_LANDLOCK_ADD_RULE = 445
|
||||
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||
SYS_PROCESS_MRELEASE = 448
|
||||
SYS_FUTEX_WAITV = 449
|
||||
)
|
||||
|
|
|
@ -312,4 +312,5 @@ const (
|
|||
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||
SYS_MEMFD_SECRET = 447
|
||||
SYS_PROCESS_MRELEASE = 448
|
||||
SYS_FUTEX_WAITV = 449
|
||||
)
|
||||
|
|
|
@ -429,4 +429,5 @@ const (
|
|||
SYS_LANDLOCK_ADD_RULE = 4445
|
||||
SYS_LANDLOCK_RESTRICT_SELF = 4446
|
||||
SYS_PROCESS_MRELEASE = 4448
|
||||
SYS_FUTEX_WAITV = 4449
|
||||
)
|
||||
|
|
|
@ -359,4 +359,5 @@ const (
|
|||
SYS_LANDLOCK_ADD_RULE = 5445
|
||||
SYS_LANDLOCK_RESTRICT_SELF = 5446
|
||||
SYS_PROCESS_MRELEASE = 5448
|
||||
SYS_FUTEX_WAITV = 5449
|
||||
)
|
||||
|
|
|
@ -359,4 +359,5 @@ const (
|
|||
SYS_LANDLOCK_ADD_RULE = 5445
|
||||
SYS_LANDLOCK_RESTRICT_SELF = 5446
|
||||
SYS_PROCESS_MRELEASE = 5448
|
||||
SYS_FUTEX_WAITV = 5449
|
||||
)
|
||||
|
|
|
@ -429,4 +429,5 @@ const (
|
|||
SYS_LANDLOCK_ADD_RULE = 4445
|
||||
SYS_LANDLOCK_RESTRICT_SELF = 4446
|
||||
SYS_PROCESS_MRELEASE = 4448
|
||||
SYS_FUTEX_WAITV = 4449
|
||||
)
|
||||
|
|
|
@ -436,4 +436,5 @@ const (
|
|||
SYS_LANDLOCK_ADD_RULE = 445
|
||||
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||
SYS_PROCESS_MRELEASE = 448
|
||||
SYS_FUTEX_WAITV = 449
|
||||
)
|
||||
|
|
|
@ -408,4 +408,5 @@ const (
|
|||
SYS_LANDLOCK_ADD_RULE = 445
|
||||
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||
SYS_PROCESS_MRELEASE = 448
|
||||
SYS_FUTEX_WAITV = 449
|
||||
)
|
||||
|
|
|
@ -408,4 +408,5 @@ const (
|
|||
SYS_LANDLOCK_ADD_RULE = 445
|
||||
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||
SYS_PROCESS_MRELEASE = 448
|
||||
SYS_FUTEX_WAITV = 449
|
||||
)
|
||||
|
|
|
@ -310,4 +310,5 @@ const (
|
|||
SYS_LANDLOCK_ADD_RULE = 445
|
||||
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||
SYS_PROCESS_MRELEASE = 448
|
||||
SYS_FUTEX_WAITV = 449
|
||||
)
|
||||
|
|
|
@ -373,4 +373,5 @@ const (
|
|||
SYS_LANDLOCK_ADD_RULE = 445
|
||||
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||
SYS_PROCESS_MRELEASE = 448
|
||||
SYS_FUTEX_WAITV = 449
|
||||
)
|
||||
|
|
|
@ -387,4 +387,5 @@ const (
|
|||
SYS_LANDLOCK_ADD_RULE = 445
|
||||
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||
SYS_PROCESS_MRELEASE = 448
|
||||
SYS_FUTEX_WAITV = 449
|
||||
)
|
||||
|
|
|
@ -24,6 +24,11 @@ type ItimerSpec struct {
|
|||
Value Timespec
|
||||
}
|
||||
|
||||
type Itimerval struct {
|
||||
Interval Timeval
|
||||
Value Timeval
|
||||
}
|
||||
|
||||
const (
|
||||
TIME_OK = 0x0
|
||||
TIME_INS = 0x1
|
||||
|
@ -867,6 +872,7 @@ const (
|
|||
CTRL_CMD_NEWMCAST_GRP = 0x7
|
||||
CTRL_CMD_DELMCAST_GRP = 0x8
|
||||
CTRL_CMD_GETMCAST_GRP = 0x9
|
||||
CTRL_CMD_GETPOLICY = 0xa
|
||||
CTRL_ATTR_UNSPEC = 0x0
|
||||
CTRL_ATTR_FAMILY_ID = 0x1
|
||||
CTRL_ATTR_FAMILY_NAME = 0x2
|
||||
|
@ -875,12 +881,19 @@ const (
|
|||
CTRL_ATTR_MAXATTR = 0x5
|
||||
CTRL_ATTR_OPS = 0x6
|
||||
CTRL_ATTR_MCAST_GROUPS = 0x7
|
||||
CTRL_ATTR_POLICY = 0x8
|
||||
CTRL_ATTR_OP_POLICY = 0x9
|
||||
CTRL_ATTR_OP = 0xa
|
||||
CTRL_ATTR_OP_UNSPEC = 0x0
|
||||
CTRL_ATTR_OP_ID = 0x1
|
||||
CTRL_ATTR_OP_FLAGS = 0x2
|
||||
CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
|
||||
CTRL_ATTR_MCAST_GRP_NAME = 0x1
|
||||
CTRL_ATTR_MCAST_GRP_ID = 0x2
|
||||
CTRL_ATTR_POLICY_UNSPEC = 0x0
|
||||
CTRL_ATTR_POLICY_DO = 0x1
|
||||
CTRL_ATTR_POLICY_DUMP = 0x2
|
||||
CTRL_ATTR_POLICY_DUMP_MAX = 0x2
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -1136,7 +1149,8 @@ const (
|
|||
PERF_RECORD_BPF_EVENT = 0x12
|
||||
PERF_RECORD_CGROUP = 0x13
|
||||
PERF_RECORD_TEXT_POKE = 0x14
|
||||
PERF_RECORD_MAX = 0x15
|
||||
PERF_RECORD_AUX_OUTPUT_HW_ID = 0x15
|
||||
PERF_RECORD_MAX = 0x16
|
||||
PERF_RECORD_KSYMBOL_TYPE_UNKNOWN = 0x0
|
||||
PERF_RECORD_KSYMBOL_TYPE_BPF = 0x1
|
||||
PERF_RECORD_KSYMBOL_TYPE_OOL = 0x2
|
||||
|
@ -1776,7 +1790,8 @@ const (
|
|||
|
||||
const (
|
||||
NF_NETDEV_INGRESS = 0x0
|
||||
NF_NETDEV_NUMHOOKS = 0x1
|
||||
NF_NETDEV_EGRESS = 0x1
|
||||
NF_NETDEV_NUMHOOKS = 0x2
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -3158,7 +3173,13 @@ const (
|
|||
DEVLINK_ATTR_RELOAD_ACTION_INFO = 0xa2
|
||||
DEVLINK_ATTR_RELOAD_ACTION_STATS = 0xa3
|
||||
DEVLINK_ATTR_PORT_PCI_SF_NUMBER = 0xa4
|
||||
DEVLINK_ATTR_MAX = 0xa9
|
||||
DEVLINK_ATTR_RATE_TYPE = 0xa5
|
||||
DEVLINK_ATTR_RATE_TX_SHARE = 0xa6
|
||||
DEVLINK_ATTR_RATE_TX_MAX = 0xa7
|
||||
DEVLINK_ATTR_RATE_NODE_NAME = 0xa8
|
||||
DEVLINK_ATTR_RATE_PARENT_NODE_NAME = 0xa9
|
||||
DEVLINK_ATTR_REGION_MAX_SNAPSHOTS = 0xaa
|
||||
DEVLINK_ATTR_MAX = 0xaa
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
|
@ -3455,7 +3476,14 @@ const (
|
|||
ETHTOOL_MSG_CABLE_TEST_ACT = 0x1a
|
||||
ETHTOOL_MSG_CABLE_TEST_TDR_ACT = 0x1b
|
||||
ETHTOOL_MSG_TUNNEL_INFO_GET = 0x1c
|
||||
ETHTOOL_MSG_USER_MAX = 0x21
|
||||
ETHTOOL_MSG_FEC_GET = 0x1d
|
||||
ETHTOOL_MSG_FEC_SET = 0x1e
|
||||
ETHTOOL_MSG_MODULE_EEPROM_GET = 0x1f
|
||||
ETHTOOL_MSG_STATS_GET = 0x20
|
||||
ETHTOOL_MSG_PHC_VCLOCKS_GET = 0x21
|
||||
ETHTOOL_MSG_MODULE_GET = 0x22
|
||||
ETHTOOL_MSG_MODULE_SET = 0x23
|
||||
ETHTOOL_MSG_USER_MAX = 0x23
|
||||
ETHTOOL_MSG_KERNEL_NONE = 0x0
|
||||
ETHTOOL_MSG_STRSET_GET_REPLY = 0x1
|
||||
ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2
|
||||
|
@ -3486,7 +3514,14 @@ const (
|
|||
ETHTOOL_MSG_CABLE_TEST_NTF = 0x1b
|
||||
ETHTOOL_MSG_CABLE_TEST_TDR_NTF = 0x1c
|
||||
ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY = 0x1d
|
||||
ETHTOOL_MSG_KERNEL_MAX = 0x22
|
||||
ETHTOOL_MSG_FEC_GET_REPLY = 0x1e
|
||||
ETHTOOL_MSG_FEC_NTF = 0x1f
|
||||
ETHTOOL_MSG_MODULE_EEPROM_GET_REPLY = 0x20
|
||||
ETHTOOL_MSG_STATS_GET_REPLY = 0x21
|
||||
ETHTOOL_MSG_PHC_VCLOCKS_GET_REPLY = 0x22
|
||||
ETHTOOL_MSG_MODULE_GET_REPLY = 0x23
|
||||
ETHTOOL_MSG_MODULE_NTF = 0x24
|
||||
ETHTOOL_MSG_KERNEL_MAX = 0x24
|
||||
ETHTOOL_A_HEADER_UNSPEC = 0x0
|
||||
ETHTOOL_A_HEADER_DEV_INDEX = 0x1
|
||||
ETHTOOL_A_HEADER_DEV_NAME = 0x2
|
||||
|
@ -3736,6 +3771,8 @@ const (
|
|||
ETHTOOL_A_TUNNEL_INFO_MAX = 0x2
|
||||
)
|
||||
|
||||
const SPEED_UNKNOWN = -0x1
|
||||
|
||||
type EthtoolDrvinfo struct {
|
||||
Cmd uint32
|
||||
Driver [32]byte
|
||||
|
@ -3968,3 +4005,158 @@ type MountAttr struct {
|
|||
Propagation uint64
|
||||
Userns_fd uint64
|
||||
}
|
||||
|
||||
const (
|
||||
WG_CMD_GET_DEVICE = 0x0
|
||||
WG_CMD_SET_DEVICE = 0x1
|
||||
WGDEVICE_F_REPLACE_PEERS = 0x1
|
||||
WGDEVICE_A_UNSPEC = 0x0
|
||||
WGDEVICE_A_IFINDEX = 0x1
|
||||
WGDEVICE_A_IFNAME = 0x2
|
||||
WGDEVICE_A_PRIVATE_KEY = 0x3
|
||||
WGDEVICE_A_PUBLIC_KEY = 0x4
|
||||
WGDEVICE_A_FLAGS = 0x5
|
||||
WGDEVICE_A_LISTEN_PORT = 0x6
|
||||
WGDEVICE_A_FWMARK = 0x7
|
||||
WGDEVICE_A_PEERS = 0x8
|
||||
WGPEER_F_REMOVE_ME = 0x1
|
||||
WGPEER_F_REPLACE_ALLOWEDIPS = 0x2
|
||||
WGPEER_F_UPDATE_ONLY = 0x4
|
||||
WGPEER_A_UNSPEC = 0x0
|
||||
WGPEER_A_PUBLIC_KEY = 0x1
|
||||
WGPEER_A_PRESHARED_KEY = 0x2
|
||||
WGPEER_A_FLAGS = 0x3
|
||||
WGPEER_A_ENDPOINT = 0x4
|
||||
WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL = 0x5
|
||||
WGPEER_A_LAST_HANDSHAKE_TIME = 0x6
|
||||
WGPEER_A_RX_BYTES = 0x7
|
||||
WGPEER_A_TX_BYTES = 0x8
|
||||
WGPEER_A_ALLOWEDIPS = 0x9
|
||||
WGPEER_A_PROTOCOL_VERSION = 0xa
|
||||
WGALLOWEDIP_A_UNSPEC = 0x0
|
||||
WGALLOWEDIP_A_FAMILY = 0x1
|
||||
WGALLOWEDIP_A_IPADDR = 0x2
|
||||
WGALLOWEDIP_A_CIDR_MASK = 0x3
|
||||
)
|
||||
|
||||
const (
|
||||
NL_ATTR_TYPE_INVALID = 0x0
|
||||
NL_ATTR_TYPE_FLAG = 0x1
|
||||
NL_ATTR_TYPE_U8 = 0x2
|
||||
NL_ATTR_TYPE_U16 = 0x3
|
||||
NL_ATTR_TYPE_U32 = 0x4
|
||||
NL_ATTR_TYPE_U64 = 0x5
|
||||
NL_ATTR_TYPE_S8 = 0x6
|
||||
NL_ATTR_TYPE_S16 = 0x7
|
||||
NL_ATTR_TYPE_S32 = 0x8
|
||||
NL_ATTR_TYPE_S64 = 0x9
|
||||
NL_ATTR_TYPE_BINARY = 0xa
|
||||
NL_ATTR_TYPE_STRING = 0xb
|
||||
NL_ATTR_TYPE_NUL_STRING = 0xc
|
||||
NL_ATTR_TYPE_NESTED = 0xd
|
||||
NL_ATTR_TYPE_NESTED_ARRAY = 0xe
|
||||
NL_ATTR_TYPE_BITFIELD32 = 0xf
|
||||
|
||||
NL_POLICY_TYPE_ATTR_UNSPEC = 0x0
|
||||
NL_POLICY_TYPE_ATTR_TYPE = 0x1
|
||||
NL_POLICY_TYPE_ATTR_MIN_VALUE_S = 0x2
|
||||
NL_POLICY_TYPE_ATTR_MAX_VALUE_S = 0x3
|
||||
NL_POLICY_TYPE_ATTR_MIN_VALUE_U = 0x4
|
||||
NL_POLICY_TYPE_ATTR_MAX_VALUE_U = 0x5
|
||||
NL_POLICY_TYPE_ATTR_MIN_LENGTH = 0x6
|
||||
NL_POLICY_TYPE_ATTR_MAX_LENGTH = 0x7
|
||||
NL_POLICY_TYPE_ATTR_POLICY_IDX = 0x8
|
||||
NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE = 0x9
|
||||
NL_POLICY_TYPE_ATTR_BITFIELD32_MASK = 0xa
|
||||
NL_POLICY_TYPE_ATTR_PAD = 0xb
|
||||
NL_POLICY_TYPE_ATTR_MASK = 0xc
|
||||
NL_POLICY_TYPE_ATTR_MAX = 0xc
|
||||
)
|
||||
|
||||
type CANBitTiming struct {
|
||||
Bitrate uint32
|
||||
Sample_point uint32
|
||||
Tq uint32
|
||||
Prop_seg uint32
|
||||
Phase_seg1 uint32
|
||||
Phase_seg2 uint32
|
||||
Sjw uint32
|
||||
Brp uint32
|
||||
}
|
||||
|
||||
type CANBitTimingConst struct {
|
||||
Name [16]uint8
|
||||
Tseg1_min uint32
|
||||
Tseg1_max uint32
|
||||
Tseg2_min uint32
|
||||
Tseg2_max uint32
|
||||
Sjw_max uint32
|
||||
Brp_min uint32
|
||||
Brp_max uint32
|
||||
Brp_inc uint32
|
||||
}
|
||||
|
||||
type CANClock struct {
|
||||
Freq uint32
|
||||
}
|
||||
|
||||
type CANBusErrorCounters struct {
|
||||
Txerr uint16
|
||||
Rxerr uint16
|
||||
}
|
||||
|
||||
type CANCtrlMode struct {
|
||||
Mask uint32
|
||||
Flags uint32
|
||||
}
|
||||
|
||||
type CANDeviceStats struct {
|
||||
Bus_error uint32
|
||||
Error_warning uint32
|
||||
Error_passive uint32
|
||||
Bus_off uint32
|
||||
Arbitration_lost uint32
|
||||
Restarts uint32
|
||||
}
|
||||
|
||||
const (
|
||||
CAN_STATE_ERROR_ACTIVE = 0x0
|
||||
CAN_STATE_ERROR_WARNING = 0x1
|
||||
CAN_STATE_ERROR_PASSIVE = 0x2
|
||||
CAN_STATE_BUS_OFF = 0x3
|
||||
CAN_STATE_STOPPED = 0x4
|
||||
CAN_STATE_SLEEPING = 0x5
|
||||
CAN_STATE_MAX = 0x6
|
||||
)
|
||||
|
||||
const (
|
||||
IFLA_CAN_UNSPEC = 0x0
|
||||
IFLA_CAN_BITTIMING = 0x1
|
||||
IFLA_CAN_BITTIMING_CONST = 0x2
|
||||
IFLA_CAN_CLOCK = 0x3
|
||||
IFLA_CAN_STATE = 0x4
|
||||
IFLA_CAN_CTRLMODE = 0x5
|
||||
IFLA_CAN_RESTART_MS = 0x6
|
||||
IFLA_CAN_RESTART = 0x7
|
||||
IFLA_CAN_BERR_COUNTER = 0x8
|
||||
IFLA_CAN_DATA_BITTIMING = 0x9
|
||||
IFLA_CAN_DATA_BITTIMING_CONST = 0xa
|
||||
IFLA_CAN_TERMINATION = 0xb
|
||||
IFLA_CAN_TERMINATION_CONST = 0xc
|
||||
IFLA_CAN_BITRATE_CONST = 0xd
|
||||
IFLA_CAN_DATA_BITRATE_CONST = 0xe
|
||||
IFLA_CAN_BITRATE_MAX = 0xf
|
||||
)
|
||||
|
||||
type KCMAttach struct {
|
||||
Fd int32
|
||||
Bpf_fd int32
|
||||
}
|
||||
|
||||
type KCMUnattach struct {
|
||||
Fd int32
|
||||
}
|
||||
|
||||
type KCMClone struct {
|
||||
Fd int32
|
||||
}
|
||||
|
|
|
@ -210,8 +210,8 @@ type PtraceFpregs struct {
|
|||
}
|
||||
|
||||
type PtracePer struct {
|
||||
_ [0]uint64
|
||||
_ [32]byte
|
||||
Control_regs [3]uint64
|
||||
_ [8]byte
|
||||
Starting_addr uint64
|
||||
Ending_addr uint64
|
||||
Perc_atmid uint16
|
||||
|
|
|
@ -9,8 +9,6 @@ package windows
|
|||
import (
|
||||
errorspkg "errors"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/internal/unsafeheader"
|
||||
)
|
||||
|
||||
// EscapeArg rewrites command line argument s as prescribed
|
||||
|
@ -147,8 +145,12 @@ func NewProcThreadAttributeList(maxAttrCount uint32) (*ProcThreadAttributeListCo
|
|||
}
|
||||
return nil, err
|
||||
}
|
||||
alloc, err := LocalAlloc(LMEM_FIXED, uint32(size))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// size is guaranteed to be ≥1 by InitializeProcThreadAttributeList.
|
||||
al := &ProcThreadAttributeListContainer{data: (*ProcThreadAttributeList)(unsafe.Pointer(&make([]byte, size)[0]))}
|
||||
al := &ProcThreadAttributeListContainer{data: (*ProcThreadAttributeList)(unsafe.Pointer(alloc))}
|
||||
err = initializeProcThreadAttributeList(al.data, maxAttrCount, 0, &size)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -157,36 +159,17 @@ func NewProcThreadAttributeList(maxAttrCount uint32) (*ProcThreadAttributeListCo
|
|||
}
|
||||
|
||||
// Update modifies the ProcThreadAttributeList using UpdateProcThreadAttribute.
|
||||
// Note that the value passed to this function will be copied into memory
|
||||
// allocated by LocalAlloc, the contents of which should not contain any
|
||||
// Go-managed pointers, even if the passed value itself is a Go-managed
|
||||
// pointer.
|
||||
func (al *ProcThreadAttributeListContainer) Update(attribute uintptr, value unsafe.Pointer, size uintptr) error {
|
||||
alloc, err := LocalAlloc(LMEM_FIXED, uint32(size))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
var src, dst []byte
|
||||
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&src))
|
||||
hdr.Data = value
|
||||
hdr.Cap = int(size)
|
||||
hdr.Len = int(size)
|
||||
hdr = (*unsafeheader.Slice)(unsafe.Pointer(&dst))
|
||||
hdr.Data = unsafe.Pointer(alloc)
|
||||
hdr.Cap = int(size)
|
||||
hdr.Len = int(size)
|
||||
copy(dst, src)
|
||||
al.heapAllocations = append(al.heapAllocations, alloc)
|
||||
return updateProcThreadAttribute(al.data, 0, attribute, unsafe.Pointer(alloc), size, nil, nil)
|
||||
al.pointers = append(al.pointers, value)
|
||||
return updateProcThreadAttribute(al.data, 0, attribute, value, size, nil, nil)
|
||||
}
|
||||
|
||||
// Delete frees ProcThreadAttributeList's resources.
|
||||
func (al *ProcThreadAttributeListContainer) Delete() {
|
||||
deleteProcThreadAttributeList(al.data)
|
||||
for i := range al.heapAllocations {
|
||||
LocalFree(Handle(al.heapAllocations[i]))
|
||||
}
|
||||
al.heapAllocations = nil
|
||||
LocalFree(Handle(unsafe.Pointer(al.data)))
|
||||
al.data = nil
|
||||
al.pointers = nil
|
||||
}
|
||||
|
||||
// List returns the actual ProcThreadAttributeList to be passed to StartupInfoEx.
|
||||
|
|
|
@ -323,6 +323,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
|||
//sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW
|
||||
//sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW
|
||||
//sys CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot
|
||||
//sys Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) = kernel32.Module32FirstW
|
||||
//sys Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) = kernel32.Module32NextW
|
||||
//sys Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32FirstW
|
||||
//sys Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32NextW
|
||||
//sys Thread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error)
|
||||
|
@ -361,6 +363,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
|||
//sys SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error)
|
||||
//sys GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error)
|
||||
//sys SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error)
|
||||
//sys GetActiveProcessorCount(groupNumber uint16) (ret uint32)
|
||||
//sys GetMaximumProcessorCount(groupNumber uint16) (ret uint32)
|
||||
|
||||
// Volume Management Functions
|
||||
//sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW
|
||||
|
|
|
@ -156,6 +156,8 @@ const (
|
|||
MAX_PATH = 260
|
||||
MAX_LONG_PATH = 32768
|
||||
|
||||
MAX_MODULE_NAME32 = 255
|
||||
|
||||
MAX_COMPUTERNAME_LENGTH = 15
|
||||
|
||||
TIME_ZONE_ID_UNKNOWN = 0
|
||||
|
@ -936,8 +938,8 @@ type StartupInfoEx struct {
|
|||
type ProcThreadAttributeList struct{}
|
||||
|
||||
type ProcThreadAttributeListContainer struct {
|
||||
data *ProcThreadAttributeList
|
||||
heapAllocations []uintptr
|
||||
data *ProcThreadAttributeList
|
||||
pointers []unsafe.Pointer
|
||||
}
|
||||
|
||||
type ProcessInformation struct {
|
||||
|
@ -970,6 +972,21 @@ type ThreadEntry32 struct {
|
|||
Flags uint32
|
||||
}
|
||||
|
||||
type ModuleEntry32 struct {
|
||||
Size uint32
|
||||
ModuleID uint32
|
||||
ProcessID uint32
|
||||
GlblcntUsage uint32
|
||||
ProccntUsage uint32
|
||||
ModBaseAddr uintptr
|
||||
ModBaseSize uint32
|
||||
ModuleHandle Handle
|
||||
Module [MAX_MODULE_NAME32 + 1]uint16
|
||||
ExePath [MAX_PATH]uint16
|
||||
}
|
||||
|
||||
const SizeofModuleEntry32 = unsafe.Sizeof(ModuleEntry32{})
|
||||
|
||||
type Systemtime struct {
|
||||
Year uint16
|
||||
Month uint16
|
||||
|
@ -2732,6 +2749,43 @@ type PROCESS_BASIC_INFORMATION struct {
|
|||
InheritedFromUniqueProcessId uintptr
|
||||
}
|
||||
|
||||
type SYSTEM_PROCESS_INFORMATION struct {
|
||||
NextEntryOffset uint32
|
||||
NumberOfThreads uint32
|
||||
WorkingSetPrivateSize int64
|
||||
HardFaultCount uint32
|
||||
NumberOfThreadsHighWatermark uint32
|
||||
CycleTime uint64
|
||||
CreateTime int64
|
||||
UserTime int64
|
||||
KernelTime int64
|
||||
ImageName NTUnicodeString
|
||||
BasePriority int32
|
||||
UniqueProcessID uintptr
|
||||
InheritedFromUniqueProcessID uintptr
|
||||
HandleCount uint32
|
||||
SessionID uint32
|
||||
UniqueProcessKey *uint32
|
||||
PeakVirtualSize uintptr
|
||||
VirtualSize uintptr
|
||||
PageFaultCount uint32
|
||||
PeakWorkingSetSize uintptr
|
||||
WorkingSetSize uintptr
|
||||
QuotaPeakPagedPoolUsage uintptr
|
||||
QuotaPagedPoolUsage uintptr
|
||||
QuotaPeakNonPagedPoolUsage uintptr
|
||||
QuotaNonPagedPoolUsage uintptr
|
||||
PagefileUsage uintptr
|
||||
PeakPagefileUsage uintptr
|
||||
PrivatePageCount uintptr
|
||||
ReadOperationCount int64
|
||||
WriteOperationCount int64
|
||||
OtherOperationCount int64
|
||||
ReadTransferCount int64
|
||||
WriteTransferCount int64
|
||||
OtherTransferCount int64
|
||||
}
|
||||
|
||||
// SystemInformationClasses for NtQuerySystemInformation and NtSetSystemInformation
|
||||
const (
|
||||
SystemBasicInformation = iota
|
||||
|
@ -3118,3 +3172,5 @@ type ModuleInfo struct {
|
|||
SizeOfImage uint32
|
||||
EntryPoint uintptr
|
||||
}
|
||||
|
||||
const ALL_PROCESSOR_GROUPS = 0xFFFF
|
||||
|
|
|
@ -226,6 +226,7 @@ var (
|
|||
procFreeLibrary = modkernel32.NewProc("FreeLibrary")
|
||||
procGenerateConsoleCtrlEvent = modkernel32.NewProc("GenerateConsoleCtrlEvent")
|
||||
procGetACP = modkernel32.NewProc("GetACP")
|
||||
procGetActiveProcessorCount = modkernel32.NewProc("GetActiveProcessorCount")
|
||||
procGetCommTimeouts = modkernel32.NewProc("GetCommTimeouts")
|
||||
procGetCommandLineW = modkernel32.NewProc("GetCommandLineW")
|
||||
procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW")
|
||||
|
@ -251,6 +252,7 @@ var (
|
|||
procGetLogicalDriveStringsW = modkernel32.NewProc("GetLogicalDriveStringsW")
|
||||
procGetLogicalDrives = modkernel32.NewProc("GetLogicalDrives")
|
||||
procGetLongPathNameW = modkernel32.NewProc("GetLongPathNameW")
|
||||
procGetMaximumProcessorCount = modkernel32.NewProc("GetMaximumProcessorCount")
|
||||
procGetModuleFileNameW = modkernel32.NewProc("GetModuleFileNameW")
|
||||
procGetModuleHandleExW = modkernel32.NewProc("GetModuleHandleExW")
|
||||
procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW")
|
||||
|
@ -295,6 +297,8 @@ var (
|
|||
procLockFileEx = modkernel32.NewProc("LockFileEx")
|
||||
procLockResource = modkernel32.NewProc("LockResource")
|
||||
procMapViewOfFile = modkernel32.NewProc("MapViewOfFile")
|
||||
procModule32FirstW = modkernel32.NewProc("Module32FirstW")
|
||||
procModule32NextW = modkernel32.NewProc("Module32NextW")
|
||||
procMoveFileExW = modkernel32.NewProc("MoveFileExW")
|
||||
procMoveFileW = modkernel32.NewProc("MoveFileW")
|
||||
procMultiByteToWideChar = modkernel32.NewProc("MultiByteToWideChar")
|
||||
|
@ -1965,6 +1969,12 @@ func GetACP() (acp uint32) {
|
|||
return
|
||||
}
|
||||
|
||||
func GetActiveProcessorCount(groupNumber uint16) (ret uint32) {
|
||||
r0, _, _ := syscall.Syscall(procGetActiveProcessorCount.Addr(), 1, uintptr(groupNumber), 0, 0)
|
||||
ret = uint32(r0)
|
||||
return
|
||||
}
|
||||
|
||||
func GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
|
||||
r1, _, e1 := syscall.Syscall(procGetCommTimeouts.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(timeouts)), 0)
|
||||
if r1 == 0 {
|
||||
|
@ -2167,6 +2177,12 @@ func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err er
|
|||
return
|
||||
}
|
||||
|
||||
func GetMaximumProcessorCount(groupNumber uint16) (ret uint32) {
|
||||
r0, _, _ := syscall.Syscall(procGetMaximumProcessorCount.Addr(), 1, uintptr(groupNumber), 0, 0)
|
||||
ret = uint32(r0)
|
||||
return
|
||||
}
|
||||
|
||||
func GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) {
|
||||
r0, _, e1 := syscall.Syscall(procGetModuleFileNameW.Addr(), 3, uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size))
|
||||
n = uint32(r0)
|
||||
|
@ -2567,6 +2583,22 @@ func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow ui
|
|||
return
|
||||
}
|
||||
|
||||
func Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {
|
||||
r1, _, e1 := syscall.Syscall(procModule32FirstW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)), 0)
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {
|
||||
r1, _, e1 := syscall.Syscall(procModule32NextW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)), 0)
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) {
|
||||
r1, _, e1 := syscall.Syscall(procMoveFileExW.Addr(), 3, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags))
|
||||
if r1 == 0 {
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
issuerepo: golang/go
|
|
@ -1,5 +1,5 @@
|
|||
module golang.org/x/term
|
||||
|
||||
go 1.11
|
||||
go 1.17
|
||||
|
||||
require golang.org/x/sys v0.0.0-20201119102817-f84b799fce68
|
||||
require golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
|
|
|
@ -7,11 +7,13 @@
|
|||
//
|
||||
// Putting a terminal into raw mode is the most common requirement:
|
||||
//
|
||||
// oldState, err := term.MakeRaw(0)
|
||||
// oldState, err := term.MakeRaw(int(os.Stdin.Fd()))
|
||||
// if err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
// defer term.Restore(0, oldState)
|
||||
// defer term.Restore(int(os.Stdin.Fd()), oldState)
|
||||
//
|
||||
// Note that on non-Unix systems os.Stdin.Fd() may not be 0.
|
||||
package term
|
||||
|
||||
// State contains the state of a terminal.
|
||||
|
|
|
@ -1,111 +0,0 @@
|
|||
// Copyright 2019 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package term
|
||||
|
||||
import (
|
||||
"io"
|
||||
"syscall"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// State contains the state of a terminal.
|
||||
type state struct {
|
||||
termios unix.Termios
|
||||
}
|
||||
|
||||
func isTerminal(fd int) bool {
|
||||
_, err := unix.IoctlGetTermio(fd, unix.TCGETA)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
func readPassword(fd int) ([]byte, error) {
|
||||
// see also: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libast/common/uwin/getpass.c
|
||||
val, err := unix.IoctlGetTermios(fd, unix.TCGETS)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
oldState := *val
|
||||
|
||||
newState := oldState
|
||||
newState.Lflag &^= syscall.ECHO
|
||||
newState.Lflag |= syscall.ICANON | syscall.ISIG
|
||||
newState.Iflag |= syscall.ICRNL
|
||||
err = unix.IoctlSetTermios(fd, unix.TCSETS, &newState)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
defer unix.IoctlSetTermios(fd, unix.TCSETS, &oldState)
|
||||
|
||||
var buf [16]byte
|
||||
var ret []byte
|
||||
for {
|
||||
n, err := syscall.Read(fd, buf[:])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if n == 0 {
|
||||
if len(ret) == 0 {
|
||||
return nil, io.EOF
|
||||
}
|
||||
break
|
||||
}
|
||||
if buf[n-1] == '\n' {
|
||||
n--
|
||||
}
|
||||
ret = append(ret, buf[:n]...)
|
||||
if n < len(buf) {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func makeRaw(fd int) (*State, error) {
|
||||
// see http://cr.illumos.org/~webrev/andy_js/1060/
|
||||
termios, err := unix.IoctlGetTermios(fd, unix.TCGETS)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
oldState := State{state{termios: *termios}}
|
||||
|
||||
termios.Iflag &^= unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON
|
||||
termios.Oflag &^= unix.OPOST
|
||||
termios.Lflag &^= unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN
|
||||
termios.Cflag &^= unix.CSIZE | unix.PARENB
|
||||
termios.Cflag |= unix.CS8
|
||||
termios.Cc[unix.VMIN] = 1
|
||||
termios.Cc[unix.VTIME] = 0
|
||||
|
||||
if err := unix.IoctlSetTermios(fd, unix.TCSETS, termios); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &oldState, nil
|
||||
}
|
||||
|
||||
func restore(fd int, oldState *State) error {
|
||||
return unix.IoctlSetTermios(fd, unix.TCSETS, &oldState.termios)
|
||||
}
|
||||
|
||||
func getState(fd int) (*State, error) {
|
||||
termios, err := unix.IoctlGetTermios(fd, unix.TCGETS)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &State{state{termios: *termios}}, nil
|
||||
}
|
||||
|
||||
func getSize(fd int) (width, height int, err error) {
|
||||
ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)
|
||||
if err != nil {
|
||||
return 0, 0, err
|
||||
}
|
||||
return int(ws.Col), int(ws.Row), nil
|
||||
}
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || zos
|
||||
// +build aix darwin dragonfly freebsd linux netbsd openbsd zos
|
||||
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
|
||||
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
|
||||
|
||||
package term
|
||||
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
// Copyright 2019 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package term
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
const ioctlReadTermios = unix.TCGETS
|
||||
const ioctlWriteTermios = unix.TCSETS
|
|
@ -1,7 +1,10 @@
|
|||
// Copyright 2019 The Go Authors. All rights reserved.
|
||||
// Copyright 2021 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build aix || linux || solaris || zos
|
||||
// +build aix linux solaris zos
|
||||
|
||||
package term
|
||||
|
||||
import "golang.org/x/sys/unix"
|
|
@ -1,10 +0,0 @@
|
|||
// Copyright 2020 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package term
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
const ioctlReadTermios = unix.TCGETS
|
||||
const ioctlWriteTermios = unix.TCSETS
|
|
@ -244,3 +244,16 @@ func Parse(data map[string]string, parsers ...ParseFunc) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// AsOptionalMap parses the data into the target as a map[string]string, if it exists.
|
||||
// The map is represented as a list of key-value pairs with a common prefix.
|
||||
func AsOptionalMap(prefix string, target map[string]string) ParseFunc {
|
||||
return func(data map[string]string) error {
|
||||
for k, v := range data {
|
||||
if strings.HasPrefix(k, prefix) && len(k) > len(prefix)+1 {
|
||||
target[k[len(prefix)+1: /* remove dot `.` */]] = v
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,6 +56,8 @@ func NewConfigFromMap(data map[string]string) (*Config, error) {
|
|||
cm.AsDuration("retry-period", &config.RetryPeriod),
|
||||
|
||||
cm.AsUint32("buckets", &config.Buckets),
|
||||
|
||||
cm.AsOptionalMap("map-lease-prefix", config.LeaseNamesPrefixMapping),
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -79,19 +81,21 @@ func NewConfigFromConfigMap(configMap *corev1.ConfigMap) (*Config, error) {
|
|||
// contained within a single namespace. Typically these will correspond to a
|
||||
// single source repository, viz: serving or eventing.
|
||||
type Config struct {
|
||||
Buckets uint32
|
||||
LeaseDuration time.Duration
|
||||
RenewDeadline time.Duration
|
||||
RetryPeriod time.Duration
|
||||
Buckets uint32
|
||||
LeaseDuration time.Duration
|
||||
RenewDeadline time.Duration
|
||||
RetryPeriod time.Duration
|
||||
LeaseNamesPrefixMapping map[string]string
|
||||
}
|
||||
|
||||
func (c *Config) GetComponentConfig(name string) ComponentConfig {
|
||||
return ComponentConfig{
|
||||
Component: name,
|
||||
Buckets: c.Buckets,
|
||||
LeaseDuration: c.LeaseDuration,
|
||||
RenewDeadline: c.RenewDeadline,
|
||||
RetryPeriod: c.RetryPeriod,
|
||||
Component: name,
|
||||
Buckets: c.Buckets,
|
||||
LeaseDuration: c.LeaseDuration,
|
||||
RenewDeadline: c.RenewDeadline,
|
||||
RetryPeriod: c.RetryPeriod,
|
||||
LeaseNamesPrefixMapping: c.LeaseNamesPrefixMapping,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,6 +127,11 @@ type ComponentConfig struct {
|
|||
// be generated to be used as identity for each BuildElector call.
|
||||
// Autoscaler uses the pod IP as identity.
|
||||
Identity string
|
||||
|
||||
// LeaseNamesPrefixMapping maps lease prefixes
|
||||
// from <component>.<package>.<reconciler_type_name> to the
|
||||
// associated value when using standardBuilder.
|
||||
LeaseNamesPrefixMapping map[string]string
|
||||
}
|
||||
|
||||
// statefulSetID is a envconfig Decodable controller ordinal and name.
|
||||
|
|
|
@ -27,6 +27,7 @@ import (
|
|||
"k8s.io/client-go/kubernetes"
|
||||
"k8s.io/client-go/tools/leaderelection"
|
||||
"k8s.io/client-go/tools/leaderelection/resourcelock"
|
||||
|
||||
"knative.dev/pkg/hash"
|
||||
"knative.dev/pkg/logging"
|
||||
"knative.dev/pkg/network"
|
||||
|
@ -192,7 +193,11 @@ func newStandardBuckets(queueName string, cc ComponentConfig) []reconciler.Bucke
|
|||
}
|
||||
|
||||
func standardBucketName(ordinal uint32, queueName string, cc ComponentConfig) string {
|
||||
return strings.ToLower(fmt.Sprintf("%s.%s.%02d-of-%02d", cc.Component, queueName, ordinal, cc.Buckets))
|
||||
prefix := fmt.Sprintf("%s.%s", cc.Component, queueName)
|
||||
if v, ok := cc.LeaseNamesPrefixMapping[prefix]; ok && len(v) > 0 {
|
||||
prefix = v
|
||||
}
|
||||
return strings.ToLower(fmt.Sprintf("%s.%02d-of-%02d", prefix, ordinal, cc.Buckets))
|
||||
}
|
||||
|
||||
type statefulSetBuilder struct {
|
||||
|
|
|
@ -152,7 +152,7 @@ go.uber.org/zap/zapcore
|
|||
golang.org/x/mod/internal/lazyregexp
|
||||
golang.org/x/mod/module
|
||||
golang.org/x/mod/semver
|
||||
# golang.org/x/net v0.0.0-20211209124913-491a49abca63
|
||||
# golang.org/x/net v0.0.0-20220225172249-27dd8689420f
|
||||
golang.org/x/net/context
|
||||
golang.org/x/net/context/ctxhttp
|
||||
golang.org/x/net/http/httpguts
|
||||
|
@ -168,13 +168,13 @@ golang.org/x/oauth2/internal
|
|||
# golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
|
||||
golang.org/x/sync/errgroup
|
||||
golang.org/x/sync/semaphore
|
||||
# golang.org/x/sys v0.0.0-20211124211545-fe61309f8881
|
||||
# golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9
|
||||
golang.org/x/sys/execabs
|
||||
golang.org/x/sys/internal/unsafeheader
|
||||
golang.org/x/sys/plan9
|
||||
golang.org/x/sys/unix
|
||||
golang.org/x/sys/windows
|
||||
# golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d
|
||||
# golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
|
||||
golang.org/x/term
|
||||
# golang.org/x/text v0.3.7
|
||||
golang.org/x/text/secure/bidirule
|
||||
|
@ -580,10 +580,10 @@ k8s.io/kube-openapi/pkg/validation/spec
|
|||
k8s.io/utils/buffer
|
||||
k8s.io/utils/integer
|
||||
k8s.io/utils/trace
|
||||
# knative.dev/hack v0.0.0-20220222192704-cf8cbc0e9165
|
||||
# knative.dev/hack v0.0.0-20220224013837-e1785985d364
|
||||
## explicit
|
||||
knative.dev/hack
|
||||
# knative.dev/pkg v0.0.0-20220222211204-80c511aa340f
|
||||
# knative.dev/pkg v0.0.0-20220301181942-2fdd5f232e77
|
||||
## explicit
|
||||
knative.dev/pkg/apis
|
||||
knative.dev/pkg/apis/duck
|
||||
|
|
Loading…
Reference in New Issue