forked from toolshed/abra
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ccb0647773 |
@@ -1,97 +0,0 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"coopcloud.tech/abra/pkg/client"
|
||||
"coopcloud.tech/abra/pkg/formatter"
|
||||
"coopcloud.tech/abra/pkg/i18n"
|
||||
"coopcloud.tech/abra/pkg/log"
|
||||
"coopcloud.tech/abra/pkg/upstream/stack"
|
||||
"coopcloud.tech/abra/pkg/vulncheck"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"context"
|
||||
)
|
||||
|
||||
var appVulncheckAliases = i18n.G("vc")
|
||||
|
||||
var AppVulncheckCommand = &cobra.Command{
|
||||
Use: i18n.G("vulncheck [flags] APP"),
|
||||
Aliases: []string{appVulncheckAliases},
|
||||
Short: i18n.G("Check for vulnerabilities in images for this app"),
|
||||
Long: i18n.G("Check for vulnerabilities in images for this app"),
|
||||
Args: cobra.ExactArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
app := internal.ValidateApp(args)
|
||||
|
||||
if err := app.Recipe.Ensure(internal.GetEnsureContext()); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
cl, err := client.New(app.Server)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
deployMeta, err := stack.IsDeployed(context.Background(), cl, app.StackName())
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if !deployMeta.IsDeployed {
|
||||
log.Fatal(i18n.G("%s is not deployed?", app.Name))
|
||||
}
|
||||
|
||||
// log.Debugf("App: %+v", app)
|
||||
// log.Debugf("Deployed version: %s", deployMeta.Version)
|
||||
status := stack.GetAllDeployedServices(cl, app.StackName())
|
||||
|
||||
ac := &vulncheck.AdvisoryClient{}
|
||||
ac.Init()
|
||||
|
||||
rows := [][]string{}
|
||||
for _, svc := range status.Services {
|
||||
imgname := formatter.TrimNs(svc.Spec.Labels["com.docker.stack.image"])
|
||||
advisories := ac.GetAdvisoriesForImage(imgname)
|
||||
for _, advisory := range advisories {
|
||||
rows = append(rows, []string{
|
||||
advisory.Recipe,
|
||||
svc.Spec.Name,
|
||||
imgname,
|
||||
advisory.ShortDesc,
|
||||
advisory.Details,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if len(rows) == 0 {
|
||||
log.Info(i18n.G("No advisories found for %s", app.Name))
|
||||
return
|
||||
}
|
||||
|
||||
table, err := formatter.CreateTable()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
headers := []string{
|
||||
i18n.G("RECIPE"),
|
||||
i18n.G("SERVICE"),
|
||||
i18n.G("IMAGE"),
|
||||
i18n.G("VERSION"),
|
||||
i18n.G("DETAILS"),
|
||||
}
|
||||
|
||||
table.
|
||||
Headers(headers...).
|
||||
Rows(rows...)
|
||||
|
||||
if err := formatter.PrintTable(table); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
upgradeTo := ac.GetRecipeUpgradeTo(deployMeta.Version)
|
||||
|
||||
log.Infof(i18n.G("Security advisories found for %s, upgrade recipe from %s to %s"), app.Recipe.Name, deployMeta.Version, upgradeTo)
|
||||
},
|
||||
}
|
||||
@@ -311,7 +311,6 @@ Config:
|
||||
app.AppVolumeCommand,
|
||||
app.AppLabelsCommand,
|
||||
app.AppEnvCommand,
|
||||
app.AppVulncheckCommand,
|
||||
)
|
||||
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
|
||||
@@ -20,7 +20,7 @@ require (
|
||||
github.com/moby/term v0.5.2
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/schollz/progressbar/v3 v3.19.1
|
||||
golang.org/x/term v0.46.0
|
||||
golang.org/x/term v0.45.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
gotest.tools/v3 v3.5.2
|
||||
)
|
||||
@@ -153,7 +153,7 @@ require (
|
||||
github.com/stretchr/testify v1.12.1
|
||||
github.com/theupdateframework/notary v0.7.0 // indirect
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
|
||||
golang.org/x/sys v0.48.0
|
||||
golang.org/x/sys v0.47.0
|
||||
)
|
||||
|
||||
replace github.com/docker/cli v28.4.0+incompatible => git.coopcloud.tech/toolshed/docker-cli v28.5.3-0.20260202112816-30df2d0b3a00+incompatible
|
||||
|
||||
@@ -1138,13 +1138,13 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo=
|
||||
golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
|
||||
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
|
||||
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
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-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.46.0 h1:3+OXuTbaKDgwk8jTi3aSLHRlmWqHEUDUtxnbFigO4YE=
|
||||
golang.org/x/term v0.46.0/go.mod h1:+K02xbkittuwc0Am4abfA3Fc+XRGXkvBXNO88NCXPoc=
|
||||
golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0=
|
||||
golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w=
|
||||
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=
|
||||
|
||||
@@ -34,24 +34,6 @@ func SmallSHA(hash string) string {
|
||||
return hash[:8]
|
||||
}
|
||||
|
||||
// TrimNs strips any repository namespace/org and digest from an image string.
|
||||
//
|
||||
// Examples:
|
||||
//
|
||||
// "n8nio/n8n:1.81.2" -> "n8n:1.81.2"
|
||||
// "nginx:1.29.0@sha256:3ab4ed..." -> "nginx:1.29.0"
|
||||
// "docker.io/library/nginx:latest" -> "nginx:latest"
|
||||
func TrimNs(image string) string {
|
||||
// 1. Remove digest suffix if present (@sha256:...)
|
||||
if idx := strings.Index(image, "@"); idx != -1 {
|
||||
image = image[:idx]
|
||||
}
|
||||
|
||||
// 2. Remove registry domain and org/namespace path (keep only the last element)
|
||||
parts := strings.Split(image, "/")
|
||||
return parts[len(parts)-1]
|
||||
}
|
||||
|
||||
// RemoveSha remove image sha from a string that are added in some docker outputs
|
||||
func RemoveSha(str string) string {
|
||||
return strings.Split(str, "@")[0]
|
||||
|
||||
@@ -3,7 +3,7 @@ version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: nginx:1.31.6
|
||||
image: nginx:1.31.5
|
||||
secrets:
|
||||
- test_pass_one
|
||||
- test_pass_two
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
package vulncheck
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"coopcloud.tech/abra/pkg/log"
|
||||
|
||||
"coopcloud.tech/abra/pkg/config"
|
||||
"coopcloud.tech/abra/pkg/formatter"
|
||||
"coopcloud.tech/abra/pkg/git"
|
||||
)
|
||||
|
||||
type Advisory struct {
|
||||
Id string `json:"ccsa_id"`
|
||||
Recipe string `json:"recipe"`
|
||||
AdvisoryDate string `json:"date"`
|
||||
RecipeVersions []string `json:"versions"`
|
||||
RecipesUpgradeTo []string `json:"upgrade_to"`
|
||||
Images []string `json:"images"`
|
||||
ShortDesc string `json:"short"`
|
||||
Details string `json:"description"`
|
||||
Url string `json:"url"`
|
||||
}
|
||||
|
||||
type AdvisoryClient struct {
|
||||
Advisories []Advisory
|
||||
}
|
||||
|
||||
func (a *AdvisoryClient) Init() {
|
||||
dir := path.Join(config.ABRA_DIR, "security-advisories")
|
||||
|
||||
if _, err := os.Stat(dir); os.IsNotExist(err) {
|
||||
log.Infof("Syncing abra security advisories...")
|
||||
err := git.Clone(dir, "https://git.coopcloud.tech/sixsmith/security-advisories.git")
|
||||
if err != nil {
|
||||
log.Debugf("Error cloning security advisories repo: ", err)
|
||||
log.Fatalf("Error cloning security advisories repo: ", err)
|
||||
}
|
||||
}
|
||||
|
||||
afp := path.Join(dir, "CCSA.json")
|
||||
err := a.loadAdvisoriesFromFile(afp)
|
||||
if err != nil {
|
||||
log.Fatalf("Error loading advisories: %v\n", err)
|
||||
}
|
||||
}
|
||||
|
||||
func (a *AdvisoryClient) loadAdvisoriesFromFile(filePath string) error {
|
||||
file, err := os.Open(filePath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
var advisories []Advisory
|
||||
decoder := json.NewDecoder(file)
|
||||
err = decoder.Decode(&advisories)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
a.Advisories = advisories
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *AdvisoryClient) GetAdvisoriesForImage(image string) []Advisory {
|
||||
var relevantAdvisories []Advisory
|
||||
for _, advisory := range a.Advisories {
|
||||
for _, img := range advisory.Images {
|
||||
if formatter.TrimNs(image) == formatter.TrimNs(img) {
|
||||
relevantAdvisories = append(relevantAdvisories, advisory)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return relevantAdvisories
|
||||
}
|
||||
|
||||
func (a *AdvisoryClient) GetRecipeUpgradeTo(recipeVer string) string {
|
||||
for _, advisory := range a.Advisories {
|
||||
for _, ver := range advisory.RecipeVersions {
|
||||
if recipeVer == ver {
|
||||
if len(advisory.RecipesUpgradeTo) > 0 {
|
||||
return advisory.RecipesUpgradeTo[0]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
package vulncheck
|
||||
@@ -3,7 +3,7 @@ version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: nginx:1.31.6
|
||||
image: nginx:1.31.5
|
||||
networks:
|
||||
- proxy
|
||||
deploy:
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.27@sha256:512690a5660563b57d37ecc31129e7f136e831db2aed24a1dbeb8ad7380dc0fa
|
||||
FROM golang:1.27@sha256:eb37f58646a901dc7727cf448cae36daaefaba79de33b5058dab79aa4c04aefb
|
||||
|
||||
ENV GOOS=linux
|
||||
ENV GOARCH=arm
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.27@sha256:512690a5660563b57d37ecc31129e7f136e831db2aed24a1dbeb8ad7380dc0fa
|
||||
FROM golang:1.27@sha256:eb37f58646a901dc7727cf448cae36daaefaba79de33b5058dab79aa4c04aefb
|
||||
|
||||
ENV GOOS=linux
|
||||
ENV GOARCH=arm64
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# This is a renovate-friendly source of Docker images.
|
||||
FROM python:3.13.6-slim-bullseye@sha256:e98b521460ee75bca92175c16247bdf7275637a8faaeb2bcfa19d879ae5c4b9a AS python
|
||||
FROM otel/weaver:v0.21.2@sha256:2401de985c38bdb98b43918e2f43aa36b2afed4aa5669ac1c1de0a17301cd36d AS weaver
|
||||
FROM otel/weaver:v0.26.1@sha256:9094862c0ab261bdbcb079bb981f9a573b3659b130a6d2ab8616eca6ba37aaec AS weaver
|
||||
FROM avtodev/markdown-lint:v1@sha256:6aeedc2f49138ce7a1cd0adffc1b1c0321b841dc2102408967d9301c031949ee AS markdown
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
codespell==2.4.2
|
||||
codespell==2.4.3
|
||||
|
||||
+6
-15
@@ -182,13 +182,12 @@ var MIPS64X struct {
|
||||
// require kernel support to work (DARN, SCV), so there are feature bits for
|
||||
// those as well. The struct is padded to avoid false sharing.
|
||||
var PPC64 struct {
|
||||
_ CacheLinePad
|
||||
HasDARN bool // Hardware random number generator (requires kernel enablement)
|
||||
HasSCV bool // Syscall vectored (requires kernel enablement)
|
||||
IsPOWER8 bool // ISA v2.07 (POWER8)
|
||||
IsPOWER9 bool // ISA v3.00 (POWER9), implies IsPOWER8
|
||||
IsPOWER10 bool // ISA v3.1 (POWER10 and POWER11; POWER11 did not add a new architected level), implies IsPOWER9
|
||||
_ CacheLinePad
|
||||
_ CacheLinePad
|
||||
HasDARN bool // Hardware random number generator (requires kernel enablement)
|
||||
HasSCV bool // Syscall vectored (requires kernel enablement)
|
||||
IsPOWER8 bool // ISA v2.07 (POWER8)
|
||||
IsPOWER9 bool // ISA v3.00 (POWER9), implies IsPOWER8
|
||||
_ CacheLinePad
|
||||
}
|
||||
|
||||
// S390X contains the supported CPU features of the current IBM Z
|
||||
@@ -249,21 +248,13 @@ var RISCV64 struct {
|
||||
HasZvks bool // ShangMi Algorithm Suite
|
||||
HasZvksc bool // ShangMi Algorithm Suite with carryless multiplication
|
||||
HasZvksg bool // ShangMi Algorithm Suite with GCM
|
||||
VLENB uint // Vector register length in bytes, 0 if undetected
|
||||
_ CacheLinePad
|
||||
}
|
||||
|
||||
// doDerived, if non-nil, is called after processing GODEBUG to set "derived"
|
||||
// feature flags.
|
||||
var doDerived func()
|
||||
|
||||
func init() {
|
||||
archInit()
|
||||
initOptions()
|
||||
processOptions()
|
||||
if doDerived != nil {
|
||||
doDerived()
|
||||
}
|
||||
}
|
||||
|
||||
// options contains the cpu debug options that can be used in GODEBUG.
|
||||
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
// Copyright 2026 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 gc
|
||||
|
||||
package cpu
|
||||
|
||||
// Can only be called when the vector extension is present.
|
||||
// Implemented in cpu_riscv64.s.
|
||||
func readVLENB() uint
|
||||
-4
@@ -11,7 +11,6 @@ const (
|
||||
// ISA Level
|
||||
_PPC_FEATURE2_ARCH_2_07 = 0x80000000
|
||||
_PPC_FEATURE2_ARCH_3_00 = 0x00800000
|
||||
_PPC_FEATURE2_ARCH_3_1 = 0x00040000
|
||||
|
||||
// CPU features
|
||||
_PPC_FEATURE2_DARN = 0x00200000
|
||||
@@ -22,9 +21,6 @@ func doinit() {
|
||||
// HWCAP2 feature bits
|
||||
PPC64.IsPOWER8 = isSet(hwCap2, _PPC_FEATURE2_ARCH_2_07)
|
||||
PPC64.IsPOWER9 = isSet(hwCap2, _PPC_FEATURE2_ARCH_3_00)
|
||||
// ISA 3.1 covers both POWER10 and POWER11: POWER11 did not introduce a
|
||||
// new architected HWCAP level, so there is no separate IsPOWER11.
|
||||
PPC64.IsPOWER10 = isSet(hwCap2, _PPC_FEATURE2_ARCH_3_1)
|
||||
PPC64.HasDARN = isSet(hwCap2, _PPC_FEATURE2_DARN)
|
||||
PPC64.HasSCV = isSet(hwCap2, _PPC_FEATURE2_SCV)
|
||||
}
|
||||
|
||||
-11
@@ -130,9 +130,6 @@ func doinit() {
|
||||
RISCV64.HasFastMisaligned = v == riscv_HWPROBE_MISALIGNED_FAST
|
||||
}
|
||||
}
|
||||
if RISCV64.HasV {
|
||||
RISCV64.VLENB = readVLENB()
|
||||
}
|
||||
|
||||
// Let's double check with HWCAP if the C extension does not appear to be supported.
|
||||
// This may happen if we're running on a kernel older than 6.4.
|
||||
@@ -140,14 +137,6 @@ func doinit() {
|
||||
if !RISCV64.HasC {
|
||||
RISCV64.HasC = isSet(hwCap, hwcap_RISCV_ISA_C)
|
||||
}
|
||||
|
||||
doDerived = func() {
|
||||
// If the vector extension is disabled by GODEBUG, then the VLENB is zero.
|
||||
if !RISCV64.HasV {
|
||||
RISCV64.VLENB = 0
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func isSet(hwc uint, value uint) bool {
|
||||
|
||||
-47
@@ -1,47 +0,0 @@
|
||||
// Copyright 2026 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 netbsd && amd64 && gc
|
||||
|
||||
package cpu
|
||||
|
||||
func doinit() {
|
||||
// NetBSD corrupts avx registers when receiving signals.
|
||||
// See issue 80285.
|
||||
// TODO: when NetBSD fixes the bug, add a version
|
||||
// check and skip here.
|
||||
X86.HasAVX = false
|
||||
X86.HasAVX2 = false
|
||||
// Set these also, just to be safe
|
||||
X86.HasAVXVNNI = false
|
||||
X86.HasAVX512 = false
|
||||
X86.HasAVX512F = false
|
||||
X86.HasAVX512CD = false
|
||||
X86.HasAVX512CD = false
|
||||
X86.HasAVX512ER = false
|
||||
X86.HasAVX512PF = false
|
||||
X86.HasAVX512VL = false
|
||||
X86.HasAVX512BW = false
|
||||
X86.HasAVX512DQ = false
|
||||
X86.HasAVX512IFMA = false
|
||||
X86.HasAVX512VBMI = false
|
||||
X86.HasAVX5124VNNIW = false
|
||||
X86.HasAVX5124FMAPS = false
|
||||
X86.HasAVX512VPOPCNTDQ = false
|
||||
X86.HasAVX512VPCLMULQDQ = false
|
||||
X86.HasAVX512VNNI = false
|
||||
X86.HasAVX512GFNI = false
|
||||
X86.HasAVX512VAES = false
|
||||
X86.HasAVX512VBMI2 = false
|
||||
X86.HasAVX512BITALG = false
|
||||
X86.HasAVX512BF16 = false
|
||||
X86.HasAVXIFMA = false
|
||||
X86.HasAVXVNNI = false
|
||||
X86.HasAVXVNNIInt8 = false
|
||||
|
||||
}
|
||||
|
||||
func darwinSupportsAVX512() bool {
|
||||
panic("only implemented for gc && amd64 && darwin")
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build 386 || amd64p32 || (amd64 && ((!darwin && !netbsd) || !gc))
|
||||
//go:build 386 || amd64p32 || (amd64 && (!darwin || !gc))
|
||||
|
||||
package cpu
|
||||
|
||||
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
// Copyright 2026 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 gc
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
// Read the vector register length in bytes from the vlenb CSR.
|
||||
// May only be called when the vector extension is present.
|
||||
// func readVLENB() uint
|
||||
TEXT ·readVLENB(SB), NOSPLIT|NOFRAME, $0-8
|
||||
// Go 1.25's assembler does not recognize VLENB, so use its raw CSRR encoding.
|
||||
// Replace WORD with CSRR VLENB, X10 once go.mod requires Go 1.27.
|
||||
WORD $0xc2202573
|
||||
MOV X10, ret+0(FP)
|
||||
RET
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// Copyright 2026 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 sparc64
|
||||
|
||||
package cpu
|
||||
|
||||
// The L1 line is 32 bytes; false sharing is governed by the 64-byte L2 line.
|
||||
const cacheLineSize = 64
|
||||
|
||||
func initOptions() {}
|
||||
+1
-7
@@ -22,13 +22,7 @@ import (
|
||||
// fields can be get and set using the following methods:
|
||||
// - Uint16/SetUint16: flags
|
||||
// - Uint32/SetUint32: ifindex, metric, mtu
|
||||
type Ifreq struct {
|
||||
// Aligns the union for the accessors below, which cast it in place;
|
||||
// the generated ifreq is all byte arrays, so its alignment is one.
|
||||
_ [0]int64
|
||||
|
||||
raw ifreq
|
||||
}
|
||||
type Ifreq struct{ raw ifreq }
|
||||
|
||||
// NewIfreq creates an Ifreq with the input network interface name after
|
||||
// validating the name does not exceed IFNAMSIZ-1 (trailing NULL required)
|
||||
|
||||
-7
@@ -332,10 +332,3 @@ func IoctlLoopSetStatus64(fd int, value *LoopInfo64) error {
|
||||
func IoctlLoopConfigure(fd int, value *LoopConfig) error {
|
||||
return ioctlPtr(fd, LOOP_CONFIGURE, unsafe.Pointer(value))
|
||||
}
|
||||
|
||||
// IoctlPidfdInfo fetches information about a pidfd.
|
||||
// The Mask field of the info argument indicates which
|
||||
// values to fetch.
|
||||
func IoctlPidfdInfo(fd int, info *PidfdInfo) error {
|
||||
return ioctlPtr(fd, PIDFD_GET_INFO, unsafe.Pointer(info))
|
||||
}
|
||||
|
||||
+8
-1
@@ -290,7 +290,14 @@ struct ltchars {
|
||||
#include <mtd/mtd-user.h>
|
||||
#include <net/route.h>
|
||||
|
||||
#if defined(__sparc__)
|
||||
// On sparc{,64}, the kernel defines struct termios2 itself which clashes with the
|
||||
// definition in glibc. As only the error constants are needed here, include the
|
||||
// generic termibits.h (which is included by termbits.h on sparc).
|
||||
#include <asm-generic/termbits.h>
|
||||
#else
|
||||
#include <asm/termbits.h>
|
||||
#endif
|
||||
|
||||
#ifndef PTRACE_GETREGS
|
||||
#define PTRACE_GETREGS 0xc
|
||||
@@ -537,7 +544,7 @@ ccflags="$@"
|
||||
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
|
||||
$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
|
||||
$2 == "LOOP_CONFIGURE" ||
|
||||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MREMAP|MFD|MLOCK|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT|UDP)_/ ||
|
||||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MREMAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT|UDP)_/ ||
|
||||
$2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||
|
||||
$2 ~ /^NFC_.*_(MAX)?SIZE$/ ||
|
||||
$2 ~ /^PTP_/ ||
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ func BytePtrToString(p *byte) string {
|
||||
// Find NUL terminator.
|
||||
n := 0
|
||||
for ptr := unsafe.Pointer(p); *(*byte)(ptr) != 0; n++ {
|
||||
ptr = unsafe.Add(ptr, 1)
|
||||
ptr = unsafe.Pointer(uintptr(ptr) + 1)
|
||||
}
|
||||
|
||||
return string(unsafe.Slice(p, n))
|
||||
|
||||
+1
-1
@@ -188,7 +188,7 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
}
|
||||
sa.raw.Len = byte(3 + n) // 2 for Family, Len; 1 for NUL
|
||||
sa.raw.Family = AF_UNIX
|
||||
for i := range n {
|
||||
for i := 0; i < n; i++ {
|
||||
sa.raw.Path[i] = int8(name[i])
|
||||
}
|
||||
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
|
||||
|
||||
+1
-1
@@ -2363,7 +2363,7 @@ func (fh *FileHandle) Bytes() []byte {
|
||||
if n == 0 {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Slice((*byte)(unsafe.Add(unsafe.Pointer(&fh.fileHandle.Type), 4)), n)
|
||||
return unsafe.Slice((*byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&fh.fileHandle.Type))+4)), n)
|
||||
}
|
||||
|
||||
// NameToHandleAt wraps the name_to_handle_at system call; it obtains
|
||||
|
||||
-2
@@ -2048,7 +2048,6 @@ const (
|
||||
MINIX3_SUPER_MAGIC = 0x4d5a
|
||||
MINIX_SUPER_MAGIC = 0x137f
|
||||
MINIX_SUPER_MAGIC2 = 0x138f
|
||||
MLOCK_ONFAULT = 0x1
|
||||
MNT_DETACH = 0x2
|
||||
MNT_EXPIRE = 0x4
|
||||
MNT_FORCE = 0x1
|
||||
@@ -3863,7 +3862,6 @@ const (
|
||||
TIOCPKT_NOSTOP = 0x10
|
||||
TIOCPKT_START = 0x8
|
||||
TIOCPKT_STOP = 0x4
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIPC_ADDR_ID = 0x3
|
||||
TIPC_ADDR_MCAST = 0x1
|
||||
TIPC_ADDR_NAME = 0x2
|
||||
|
||||
+1
@@ -483,6 +483,7 @@ const (
|
||||
TIOCSERGWILD = 0x5454
|
||||
TIOCSERSETMULTI = 0x545b
|
||||
TIOCSERSWILD = 0x5455
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETD = 0x5423
|
||||
TIOCSIG = 0x40045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
|
||||
+1
@@ -484,6 +484,7 @@ const (
|
||||
TIOCSERGWILD = 0x5454
|
||||
TIOCSERSETMULTI = 0x545b
|
||||
TIOCSERSWILD = 0x5455
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETD = 0x5423
|
||||
TIOCSIG = 0x40045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
|
||||
+1
@@ -489,6 +489,7 @@ const (
|
||||
TIOCSERGWILD = 0x5454
|
||||
TIOCSERSETMULTI = 0x545b
|
||||
TIOCSERSWILD = 0x5455
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETD = 0x5423
|
||||
TIOCSIG = 0x40045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
|
||||
+1
@@ -483,6 +483,7 @@ const (
|
||||
TIOCSERGWILD = 0x5454
|
||||
TIOCSERSETMULTI = 0x545b
|
||||
TIOCSERSWILD = 0x5455
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETD = 0x5423
|
||||
TIOCSIG = 0x40045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
|
||||
+1
@@ -476,6 +476,7 @@ const (
|
||||
TIOCSERGWILD = 0x5454
|
||||
TIOCSERSETMULTI = 0x545b
|
||||
TIOCSERSWILD = 0x5455
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETD = 0x5423
|
||||
TIOCSIG = 0x40045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
|
||||
+1
@@ -481,6 +481,7 @@ const (
|
||||
TIOCSERGWILD = 0x5489
|
||||
TIOCSERSETMULTI = 0x5490
|
||||
TIOCSERSWILD = 0x548a
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETD = 0x7401
|
||||
TIOCSETN = 0x740a
|
||||
TIOCSETP = 0x7409
|
||||
|
||||
+1
@@ -481,6 +481,7 @@ const (
|
||||
TIOCSERGWILD = 0x5489
|
||||
TIOCSERSETMULTI = 0x5490
|
||||
TIOCSERSWILD = 0x548a
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETD = 0x7401
|
||||
TIOCSETN = 0x740a
|
||||
TIOCSETP = 0x7409
|
||||
|
||||
+1
@@ -481,6 +481,7 @@ const (
|
||||
TIOCSERGWILD = 0x5489
|
||||
TIOCSERSETMULTI = 0x5490
|
||||
TIOCSERSWILD = 0x548a
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETD = 0x7401
|
||||
TIOCSETN = 0x740a
|
||||
TIOCSETP = 0x7409
|
||||
|
||||
+1
@@ -481,6 +481,7 @@ const (
|
||||
TIOCSERGWILD = 0x5489
|
||||
TIOCSERSETMULTI = 0x5490
|
||||
TIOCSERSWILD = 0x548a
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETD = 0x7401
|
||||
TIOCSETN = 0x740a
|
||||
TIOCSETP = 0x7409
|
||||
|
||||
+1
@@ -535,6 +535,7 @@ const (
|
||||
TIOCSERGWILD = 0x5454
|
||||
TIOCSERSETMULTI = 0x545b
|
||||
TIOCSERSWILD = 0x5455
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETC = 0x80067411
|
||||
TIOCSETD = 0x5423
|
||||
TIOCSETN = 0x8006740a
|
||||
|
||||
+1
@@ -539,6 +539,7 @@ const (
|
||||
TIOCSERGWILD = 0x5454
|
||||
TIOCSERSETMULTI = 0x545b
|
||||
TIOCSERSWILD = 0x5455
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETC = 0x80067411
|
||||
TIOCSETD = 0x5423
|
||||
TIOCSETN = 0x8006740a
|
||||
|
||||
+1
@@ -539,6 +539,7 @@ const (
|
||||
TIOCSERGWILD = 0x5454
|
||||
TIOCSERSETMULTI = 0x545b
|
||||
TIOCSERSWILD = 0x5455
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETC = 0x80067411
|
||||
TIOCSETD = 0x5423
|
||||
TIOCSETN = 0x8006740a
|
||||
|
||||
+1
@@ -486,6 +486,7 @@ const (
|
||||
TIOCSERGWILD = 0x5454
|
||||
TIOCSERSETMULTI = 0x545b
|
||||
TIOCSERSWILD = 0x5455
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETD = 0x5423
|
||||
TIOCSIG = 0x40045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
|
||||
+1
@@ -545,6 +545,7 @@ const (
|
||||
TIOCSERGWILD = 0x5454
|
||||
TIOCSERSETMULTI = 0x545b
|
||||
TIOCSERSWILD = 0x5455
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETD = 0x5423
|
||||
TIOCSIG = 0x40045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
|
||||
+15
-20
@@ -14,21 +14,21 @@ const (
|
||||
ASI_LEON_DFLUSH = 0x11
|
||||
ASI_LEON_IFLUSH = 0x10
|
||||
ASI_LEON_MMUFLUSH = 0x18
|
||||
B1000000 = 0x100c
|
||||
B1000000 = 0x1008
|
||||
B115200 = 0x1002
|
||||
B1152000 = 0x100d
|
||||
B1500000 = 0x100e
|
||||
B153600 = 0x1006
|
||||
B2000000 = 0x100f
|
||||
B1152000 = 0x1009
|
||||
B1500000 = 0x100a
|
||||
B2000000 = 0x100b
|
||||
B230400 = 0x1003
|
||||
B307200 = 0x1007
|
||||
B2500000 = 0x100c
|
||||
B3000000 = 0x100d
|
||||
B3500000 = 0x100e
|
||||
B4000000 = 0x100f
|
||||
B460800 = 0x1004
|
||||
B500000 = 0x100a
|
||||
B500000 = 0x1005
|
||||
B57600 = 0x1001
|
||||
B576000 = 0x100b
|
||||
B614400 = 0x1008
|
||||
B76800 = 0x1005
|
||||
B921600 = 0x1009
|
||||
B576000 = 0x1006
|
||||
B921600 = 0x1007
|
||||
BLKALIGNOFF = 0x2000127a
|
||||
BLKBSZGET = 0x40081270
|
||||
BLKBSZSET = 0x80081271
|
||||
@@ -91,7 +91,7 @@ const (
|
||||
FFDLY = 0x8000
|
||||
FICLONE = 0x80049409
|
||||
FICLONERANGE = 0x8020940d
|
||||
FLUSHO = 0x2000
|
||||
FLUSHO = 0x1000
|
||||
FS_IOC_ENABLE_VERITY = 0x80806685
|
||||
FS_IOC_GETFLAGS = 0x40086601
|
||||
FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
|
||||
@@ -563,9 +563,6 @@ const (
|
||||
TIOCM_CD = 0x40
|
||||
TIOCM_CTS = 0x20
|
||||
TIOCM_DSR = 0x100
|
||||
TIOCM_LOOP = 0x8000
|
||||
TIOCM_OUT1 = 0x2000
|
||||
TIOCM_OUT2 = 0x4000
|
||||
TIOCM_RI = 0x80
|
||||
TIOCM_RNG = 0x80
|
||||
TIOCM_SR = 0x10
|
||||
@@ -644,11 +641,10 @@ const (
|
||||
UBI_IOCVOLRMBLK = 0x20004f08
|
||||
UBI_IOCVOLUP = 0x80084f00
|
||||
VDISCARD = 0xd
|
||||
VDSUSP = 0xb
|
||||
VEOF = 0x4
|
||||
VEOL = 0x5
|
||||
VEOL2 = 0x6
|
||||
VMIN = 0x4
|
||||
VEOL = 0xb
|
||||
VEOL2 = 0x10
|
||||
VMIN = 0x6
|
||||
VREPRINT = 0xc
|
||||
VSTART = 0x8
|
||||
VSTOP = 0x9
|
||||
@@ -668,7 +664,6 @@ const (
|
||||
WDIOC_KEEPALIVE = 0x40045705
|
||||
WDIOC_SETOPTIONS = 0x40045704
|
||||
WORDSIZE = 0x40
|
||||
WRAP = 0x20000
|
||||
XCASE = 0x4
|
||||
XTABS = 0x1800
|
||||
_HIDIOCGRAWNAME = 0x40804804
|
||||
|
||||
+7
-79
@@ -4264,29 +4264,19 @@ type HwTstampConfig struct {
|
||||
}
|
||||
|
||||
const (
|
||||
HWTSTAMP_FILTER_NONE = 0x0
|
||||
HWTSTAMP_FILTER_ALL = 0x1
|
||||
HWTSTAMP_FILTER_SOME = 0x2
|
||||
HWTSTAMP_FILTER_PTP_V1_L4_EVENT = 0x3
|
||||
HWTSTAMP_FILTER_PTP_V1_L4_SYNC = 0x4
|
||||
HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ = 0x5
|
||||
HWTSTAMP_FILTER_PTP_V2_L4_EVENT = 0x6
|
||||
HWTSTAMP_FILTER_PTP_V2_L4_SYNC = 0x7
|
||||
HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ = 0x8
|
||||
HWTSTAMP_FILTER_PTP_V2_L2_EVENT = 0x9
|
||||
HWTSTAMP_FILTER_PTP_V2_L2_SYNC = 0xa
|
||||
HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ = 0xb
|
||||
HWTSTAMP_FILTER_PTP_V2_EVENT = 0xc
|
||||
HWTSTAMP_FILTER_PTP_V2_SYNC = 0xd
|
||||
HWTSTAMP_FILTER_PTP_V2_DELAY_REQ = 0xe
|
||||
HWTSTAMP_FILTER_NTP_ALL = 0xf
|
||||
HWTSTAMP_FILTER_NONE = 0x0
|
||||
HWTSTAMP_FILTER_ALL = 0x1
|
||||
HWTSTAMP_FILTER_SOME = 0x2
|
||||
HWTSTAMP_FILTER_PTP_V1_L4_EVENT = 0x3
|
||||
HWTSTAMP_FILTER_PTP_V2_L4_EVENT = 0x6
|
||||
HWTSTAMP_FILTER_PTP_V2_L2_EVENT = 0x9
|
||||
HWTSTAMP_FILTER_PTP_V2_EVENT = 0xc
|
||||
)
|
||||
|
||||
const (
|
||||
HWTSTAMP_TX_OFF = 0x0
|
||||
HWTSTAMP_TX_ON = 0x1
|
||||
HWTSTAMP_TX_ONESTEP_SYNC = 0x2
|
||||
HWTSTAMP_TX_ONESTEP_P2P = 0x3
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -4551,48 +4541,6 @@ const (
|
||||
LANDLOCK_RULE_PATH_BENEATH = 0x1
|
||||
)
|
||||
|
||||
const (
|
||||
PIDFD_SIGNAL_THREAD = 0x1
|
||||
PIDFD_SIGNAL_THREAD_GROUP = 0x2
|
||||
PIDFD_SIGNAL_PROCESS_GROUP = 0x4
|
||||
PIDFD_SELF_THREAD = -0x2710
|
||||
PIDFD_SELF_THREAD_GROUP = -0x2711
|
||||
PIDFD_SELF = -0x2710
|
||||
PIDFD_SELF_PROCESS = -0x2711
|
||||
PIDFD_INFO_PID = 0x1
|
||||
PIDFD_INFO_CREDS = 0x2
|
||||
PIDFD_INFO_CGROUPID = 0x4
|
||||
PIDFD_INFO_EXIT = 0x8
|
||||
PIDFD_INFO_COREDUMP = 0x10
|
||||
PIDFD_COREDUMPED = 0x1
|
||||
PIDFD_COREDUMP_SKIP = 0x2
|
||||
PIDFD_COREDUMP_USER = 0x4
|
||||
PIDFD_COREDUMP_ROOT = 0x8
|
||||
PIDFD_INFO_SIZE_VER0 = 0x40
|
||||
PIDFD_GET_INFO = 0xc048ff0b
|
||||
)
|
||||
|
||||
const SizeofPidfdInfo = 0x48
|
||||
|
||||
type PidfdInfo struct {
|
||||
Mask uint64
|
||||
Cgroupid uint64
|
||||
Pid uint32
|
||||
Tgid uint32
|
||||
Ppid uint32
|
||||
Ruid uint32
|
||||
Rgid uint32
|
||||
Euid uint32
|
||||
Egid uint32
|
||||
Suid uint32
|
||||
Sgid uint32
|
||||
Fsuid uint32
|
||||
Fsgid uint32
|
||||
Exit_code int32
|
||||
Coredump_mask uint32
|
||||
_ uint32
|
||||
}
|
||||
|
||||
const (
|
||||
IPC_CREAT = 0x200
|
||||
IPC_EXCL = 0x400
|
||||
@@ -6525,23 +6473,3 @@ type GPIOV2LineEvent struct {
|
||||
Line_seqno uint32
|
||||
_ [6]uint32
|
||||
}
|
||||
|
||||
const (
|
||||
IPMI_MAX_ADDR_SIZE = 0x20
|
||||
IPMI_SYSTEM_INTERFACE_ADDR_TYPE = 0xc
|
||||
IPMI_BMC_CHANNEL = 0xf
|
||||
IPMI_RESPONSE_RECV_TYPE = 0x1
|
||||
)
|
||||
|
||||
type IPMISystemInterfaceAddr struct {
|
||||
Type int32
|
||||
Channel int16
|
||||
Lun uint8
|
||||
_ [1]byte
|
||||
}
|
||||
type IPMIMsg struct {
|
||||
Netfn uint8
|
||||
Cmd uint8
|
||||
Len uint16
|
||||
Data *uint8
|
||||
}
|
||||
|
||||
+1
-31
@@ -680,18 +680,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
PIDFD_THREAD = 0x80
|
||||
PIDFD_GET_CGROUP_NAMESPACE = 0xff01
|
||||
PIDFD_GET_IPC_NAMESPACE = 0xff02
|
||||
PIDFD_GET_MNT_NAMESPACE = 0xff03
|
||||
PIDFD_GET_NET_NAMESPACE = 0xff04
|
||||
PIDFD_GET_PID_NAMESPACE = 0xff05
|
||||
PIDFD_GET_PID_FOR_CHILDREN_NAMESPACE = 0xff06
|
||||
PIDFD_GET_TIME_NAMESPACE = 0xff07
|
||||
PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE = 0xff08
|
||||
PIDFD_GET_USER_NAMESPACE = 0xff09
|
||||
PIDFD_GET_UTS_NAMESPACE = 0xff0a
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
@@ -726,22 +715,3 @@ type SysvShmDesc struct {
|
||||
const (
|
||||
GPIO_GET_CHIPINFO_IOCTL = 0x8044b401
|
||||
)
|
||||
|
||||
const (
|
||||
IPMICTL_SEND_COMMAND = 0x8014690d
|
||||
IPMICTL_RECEIVE_MSG = 0xc018690c
|
||||
)
|
||||
|
||||
type IPMIReq struct {
|
||||
Addr *uint8
|
||||
Len uint32
|
||||
Msgid int32
|
||||
Msg IPMIMsg
|
||||
}
|
||||
type IPMIRecv struct {
|
||||
Recv_type int32
|
||||
Addr *uint8
|
||||
Addr_len uint32
|
||||
Msgid int32
|
||||
Msg IPMIMsg
|
||||
}
|
||||
|
||||
+1
-31
@@ -697,18 +697,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
PIDFD_THREAD = 0x80
|
||||
PIDFD_GET_CGROUP_NAMESPACE = 0xff01
|
||||
PIDFD_GET_IPC_NAMESPACE = 0xff02
|
||||
PIDFD_GET_MNT_NAMESPACE = 0xff03
|
||||
PIDFD_GET_NET_NAMESPACE = 0xff04
|
||||
PIDFD_GET_PID_NAMESPACE = 0xff05
|
||||
PIDFD_GET_PID_FOR_CHILDREN_NAMESPACE = 0xff06
|
||||
PIDFD_GET_TIME_NAMESPACE = 0xff07
|
||||
PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE = 0xff08
|
||||
PIDFD_GET_USER_NAMESPACE = 0xff09
|
||||
PIDFD_GET_UTS_NAMESPACE = 0xff0a
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
@@ -740,22 +729,3 @@ type SysvShmDesc struct {
|
||||
const (
|
||||
GPIO_GET_CHIPINFO_IOCTL = 0x8044b401
|
||||
)
|
||||
|
||||
const (
|
||||
IPMICTL_SEND_COMMAND = 0x8028690d
|
||||
IPMICTL_RECEIVE_MSG = 0xc030690c
|
||||
)
|
||||
|
||||
type IPMIReq struct {
|
||||
Addr *uint8
|
||||
Len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
type IPMIRecv struct {
|
||||
Recv_type int32
|
||||
Addr *uint8
|
||||
Addr_len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
|
||||
+1
-31
@@ -674,18 +674,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
PIDFD_THREAD = 0x80
|
||||
PIDFD_GET_CGROUP_NAMESPACE = 0xff01
|
||||
PIDFD_GET_IPC_NAMESPACE = 0xff02
|
||||
PIDFD_GET_MNT_NAMESPACE = 0xff03
|
||||
PIDFD_GET_NET_NAMESPACE = 0xff04
|
||||
PIDFD_GET_PID_NAMESPACE = 0xff05
|
||||
PIDFD_GET_PID_FOR_CHILDREN_NAMESPACE = 0xff06
|
||||
PIDFD_GET_TIME_NAMESPACE = 0xff07
|
||||
PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE = 0xff08
|
||||
PIDFD_GET_USER_NAMESPACE = 0xff09
|
||||
PIDFD_GET_UTS_NAMESPACE = 0xff0a
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
@@ -720,22 +709,3 @@ type SysvShmDesc struct {
|
||||
const (
|
||||
GPIO_GET_CHIPINFO_IOCTL = 0x8044b401
|
||||
)
|
||||
|
||||
const (
|
||||
IPMICTL_SEND_COMMAND = 0x8014690d
|
||||
IPMICTL_RECEIVE_MSG = 0xc018690c
|
||||
)
|
||||
|
||||
type IPMIReq struct {
|
||||
Addr *uint8
|
||||
Len uint32
|
||||
Msgid int32
|
||||
Msg IPMIMsg
|
||||
}
|
||||
type IPMIRecv struct {
|
||||
Recv_type int32
|
||||
Addr *uint8
|
||||
Addr_len uint32
|
||||
Msgid int32
|
||||
Msg IPMIMsg
|
||||
}
|
||||
|
||||
+1
-31
@@ -676,18 +676,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
PIDFD_THREAD = 0x80
|
||||
PIDFD_GET_CGROUP_NAMESPACE = 0xff01
|
||||
PIDFD_GET_IPC_NAMESPACE = 0xff02
|
||||
PIDFD_GET_MNT_NAMESPACE = 0xff03
|
||||
PIDFD_GET_NET_NAMESPACE = 0xff04
|
||||
PIDFD_GET_PID_NAMESPACE = 0xff05
|
||||
PIDFD_GET_PID_FOR_CHILDREN_NAMESPACE = 0xff06
|
||||
PIDFD_GET_TIME_NAMESPACE = 0xff07
|
||||
PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE = 0xff08
|
||||
PIDFD_GET_USER_NAMESPACE = 0xff09
|
||||
PIDFD_GET_UTS_NAMESPACE = 0xff0a
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
@@ -719,22 +708,3 @@ type SysvShmDesc struct {
|
||||
const (
|
||||
GPIO_GET_CHIPINFO_IOCTL = 0x8044b401
|
||||
)
|
||||
|
||||
const (
|
||||
IPMICTL_SEND_COMMAND = 0x8028690d
|
||||
IPMICTL_RECEIVE_MSG = 0xc030690c
|
||||
)
|
||||
|
||||
type IPMIReq struct {
|
||||
Addr *uint8
|
||||
Len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
type IPMIRecv struct {
|
||||
Recv_type int32
|
||||
Addr *uint8
|
||||
Addr_len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
|
||||
+1
-31
@@ -677,18 +677,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
PIDFD_THREAD = 0x80
|
||||
PIDFD_GET_CGROUP_NAMESPACE = 0xff01
|
||||
PIDFD_GET_IPC_NAMESPACE = 0xff02
|
||||
PIDFD_GET_MNT_NAMESPACE = 0xff03
|
||||
PIDFD_GET_NET_NAMESPACE = 0xff04
|
||||
PIDFD_GET_PID_NAMESPACE = 0xff05
|
||||
PIDFD_GET_PID_FOR_CHILDREN_NAMESPACE = 0xff06
|
||||
PIDFD_GET_TIME_NAMESPACE = 0xff07
|
||||
PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE = 0xff08
|
||||
PIDFD_GET_USER_NAMESPACE = 0xff09
|
||||
PIDFD_GET_UTS_NAMESPACE = 0xff0a
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
@@ -720,22 +709,3 @@ type SysvShmDesc struct {
|
||||
const (
|
||||
GPIO_GET_CHIPINFO_IOCTL = 0x8044b401
|
||||
)
|
||||
|
||||
const (
|
||||
IPMICTL_SEND_COMMAND = 0x8028690d
|
||||
IPMICTL_RECEIVE_MSG = 0xc030690c
|
||||
)
|
||||
|
||||
type IPMIReq struct {
|
||||
Addr *uint8
|
||||
Len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
type IPMIRecv struct {
|
||||
Recv_type int32
|
||||
Addr *uint8
|
||||
Addr_len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
|
||||
+1
-31
@@ -680,18 +680,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x80
|
||||
PIDFD_THREAD = 0x400
|
||||
PIDFD_GET_CGROUP_NAMESPACE = 0x2000ff01
|
||||
PIDFD_GET_IPC_NAMESPACE = 0x2000ff02
|
||||
PIDFD_GET_MNT_NAMESPACE = 0x2000ff03
|
||||
PIDFD_GET_NET_NAMESPACE = 0x2000ff04
|
||||
PIDFD_GET_PID_NAMESPACE = 0x2000ff05
|
||||
PIDFD_GET_PID_FOR_CHILDREN_NAMESPACE = 0x2000ff06
|
||||
PIDFD_GET_TIME_NAMESPACE = 0x2000ff07
|
||||
PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE = 0x2000ff08
|
||||
PIDFD_GET_USER_NAMESPACE = 0x2000ff09
|
||||
PIDFD_GET_UTS_NAMESPACE = 0x2000ff0a
|
||||
PIDFD_NONBLOCK = 0x80
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
@@ -725,22 +714,3 @@ type SysvShmDesc struct {
|
||||
const (
|
||||
GPIO_GET_CHIPINFO_IOCTL = 0x4044b401
|
||||
)
|
||||
|
||||
const (
|
||||
IPMICTL_SEND_COMMAND = 0x4014690d
|
||||
IPMICTL_RECEIVE_MSG = 0xc018690c
|
||||
)
|
||||
|
||||
type IPMIReq struct {
|
||||
Addr *uint8
|
||||
Len uint32
|
||||
Msgid int32
|
||||
Msg IPMIMsg
|
||||
}
|
||||
type IPMIRecv struct {
|
||||
Recv_type int32
|
||||
Addr *uint8
|
||||
Addr_len uint32
|
||||
Msgid int32
|
||||
Msg IPMIMsg
|
||||
}
|
||||
|
||||
+1
-31
@@ -679,18 +679,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x80
|
||||
PIDFD_THREAD = 0x400
|
||||
PIDFD_GET_CGROUP_NAMESPACE = 0x2000ff01
|
||||
PIDFD_GET_IPC_NAMESPACE = 0x2000ff02
|
||||
PIDFD_GET_MNT_NAMESPACE = 0x2000ff03
|
||||
PIDFD_GET_NET_NAMESPACE = 0x2000ff04
|
||||
PIDFD_GET_PID_NAMESPACE = 0x2000ff05
|
||||
PIDFD_GET_PID_FOR_CHILDREN_NAMESPACE = 0x2000ff06
|
||||
PIDFD_GET_TIME_NAMESPACE = 0x2000ff07
|
||||
PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE = 0x2000ff08
|
||||
PIDFD_GET_USER_NAMESPACE = 0x2000ff09
|
||||
PIDFD_GET_UTS_NAMESPACE = 0x2000ff0a
|
||||
PIDFD_NONBLOCK = 0x80
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
@@ -722,22 +711,3 @@ type SysvShmDesc struct {
|
||||
const (
|
||||
GPIO_GET_CHIPINFO_IOCTL = 0x4044b401
|
||||
)
|
||||
|
||||
const (
|
||||
IPMICTL_SEND_COMMAND = 0x4028690d
|
||||
IPMICTL_RECEIVE_MSG = 0xc030690c
|
||||
)
|
||||
|
||||
type IPMIReq struct {
|
||||
Addr *uint8
|
||||
Len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
type IPMIRecv struct {
|
||||
Recv_type int32
|
||||
Addr *uint8
|
||||
Addr_len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
|
||||
+1
-31
@@ -679,18 +679,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x80
|
||||
PIDFD_THREAD = 0x400
|
||||
PIDFD_GET_CGROUP_NAMESPACE = 0x2000ff01
|
||||
PIDFD_GET_IPC_NAMESPACE = 0x2000ff02
|
||||
PIDFD_GET_MNT_NAMESPACE = 0x2000ff03
|
||||
PIDFD_GET_NET_NAMESPACE = 0x2000ff04
|
||||
PIDFD_GET_PID_NAMESPACE = 0x2000ff05
|
||||
PIDFD_GET_PID_FOR_CHILDREN_NAMESPACE = 0x2000ff06
|
||||
PIDFD_GET_TIME_NAMESPACE = 0x2000ff07
|
||||
PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE = 0x2000ff08
|
||||
PIDFD_GET_USER_NAMESPACE = 0x2000ff09
|
||||
PIDFD_GET_UTS_NAMESPACE = 0x2000ff0a
|
||||
PIDFD_NONBLOCK = 0x80
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
@@ -722,22 +711,3 @@ type SysvShmDesc struct {
|
||||
const (
|
||||
GPIO_GET_CHIPINFO_IOCTL = 0x4044b401
|
||||
)
|
||||
|
||||
const (
|
||||
IPMICTL_SEND_COMMAND = 0x4028690d
|
||||
IPMICTL_RECEIVE_MSG = 0xc030690c
|
||||
)
|
||||
|
||||
type IPMIReq struct {
|
||||
Addr *uint8
|
||||
Len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
type IPMIRecv struct {
|
||||
Recv_type int32
|
||||
Addr *uint8
|
||||
Addr_len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
|
||||
+1
-31
@@ -680,18 +680,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x80
|
||||
PIDFD_THREAD = 0x400
|
||||
PIDFD_GET_CGROUP_NAMESPACE = 0x2000ff01
|
||||
PIDFD_GET_IPC_NAMESPACE = 0x2000ff02
|
||||
PIDFD_GET_MNT_NAMESPACE = 0x2000ff03
|
||||
PIDFD_GET_NET_NAMESPACE = 0x2000ff04
|
||||
PIDFD_GET_PID_NAMESPACE = 0x2000ff05
|
||||
PIDFD_GET_PID_FOR_CHILDREN_NAMESPACE = 0x2000ff06
|
||||
PIDFD_GET_TIME_NAMESPACE = 0x2000ff07
|
||||
PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE = 0x2000ff08
|
||||
PIDFD_GET_USER_NAMESPACE = 0x2000ff09
|
||||
PIDFD_GET_UTS_NAMESPACE = 0x2000ff0a
|
||||
PIDFD_NONBLOCK = 0x80
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
@@ -725,22 +714,3 @@ type SysvShmDesc struct {
|
||||
const (
|
||||
GPIO_GET_CHIPINFO_IOCTL = 0x4044b401
|
||||
)
|
||||
|
||||
const (
|
||||
IPMICTL_SEND_COMMAND = 0x4014690d
|
||||
IPMICTL_RECEIVE_MSG = 0xc018690c
|
||||
)
|
||||
|
||||
type IPMIReq struct {
|
||||
Addr *uint8
|
||||
Len uint32
|
||||
Msgid int32
|
||||
Msg IPMIMsg
|
||||
}
|
||||
type IPMIRecv struct {
|
||||
Recv_type int32
|
||||
Addr *uint8
|
||||
Addr_len uint32
|
||||
Msgid int32
|
||||
Msg IPMIMsg
|
||||
}
|
||||
|
||||
+1
-31
@@ -686,18 +686,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
PIDFD_THREAD = 0x80
|
||||
PIDFD_GET_CGROUP_NAMESPACE = 0x2000ff01
|
||||
PIDFD_GET_IPC_NAMESPACE = 0x2000ff02
|
||||
PIDFD_GET_MNT_NAMESPACE = 0x2000ff03
|
||||
PIDFD_GET_NET_NAMESPACE = 0x2000ff04
|
||||
PIDFD_GET_PID_NAMESPACE = 0x2000ff05
|
||||
PIDFD_GET_PID_FOR_CHILDREN_NAMESPACE = 0x2000ff06
|
||||
PIDFD_GET_TIME_NAMESPACE = 0x2000ff07
|
||||
PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE = 0x2000ff08
|
||||
PIDFD_GET_USER_NAMESPACE = 0x2000ff09
|
||||
PIDFD_GET_UTS_NAMESPACE = 0x2000ff0a
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
@@ -733,22 +722,3 @@ type SysvShmDesc struct {
|
||||
const (
|
||||
GPIO_GET_CHIPINFO_IOCTL = 0x4044b401
|
||||
)
|
||||
|
||||
const (
|
||||
IPMICTL_SEND_COMMAND = 0x4014690d
|
||||
IPMICTL_RECEIVE_MSG = 0xc018690c
|
||||
)
|
||||
|
||||
type IPMIReq struct {
|
||||
Addr *uint8
|
||||
Len uint32
|
||||
Msgid int32
|
||||
Msg IPMIMsg
|
||||
}
|
||||
type IPMIRecv struct {
|
||||
Recv_type int32
|
||||
Addr *uint8
|
||||
Addr_len uint32
|
||||
Msgid int32
|
||||
Msg IPMIMsg
|
||||
}
|
||||
|
||||
+1
-31
@@ -686,18 +686,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
PIDFD_THREAD = 0x80
|
||||
PIDFD_GET_CGROUP_NAMESPACE = 0x2000ff01
|
||||
PIDFD_GET_IPC_NAMESPACE = 0x2000ff02
|
||||
PIDFD_GET_MNT_NAMESPACE = 0x2000ff03
|
||||
PIDFD_GET_NET_NAMESPACE = 0x2000ff04
|
||||
PIDFD_GET_PID_NAMESPACE = 0x2000ff05
|
||||
PIDFD_GET_PID_FOR_CHILDREN_NAMESPACE = 0x2000ff06
|
||||
PIDFD_GET_TIME_NAMESPACE = 0x2000ff07
|
||||
PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE = 0x2000ff08
|
||||
PIDFD_GET_USER_NAMESPACE = 0x2000ff09
|
||||
PIDFD_GET_UTS_NAMESPACE = 0x2000ff0a
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
@@ -728,22 +717,3 @@ type SysvShmDesc struct {
|
||||
const (
|
||||
GPIO_GET_CHIPINFO_IOCTL = 0x4044b401
|
||||
)
|
||||
|
||||
const (
|
||||
IPMICTL_SEND_COMMAND = 0x4028690d
|
||||
IPMICTL_RECEIVE_MSG = 0xc030690c
|
||||
)
|
||||
|
||||
type IPMIReq struct {
|
||||
Addr *uint8
|
||||
Len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
type IPMIRecv struct {
|
||||
Recv_type int32
|
||||
Addr *uint8
|
||||
Addr_len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
|
||||
+1
-31
@@ -686,18 +686,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
PIDFD_THREAD = 0x80
|
||||
PIDFD_GET_CGROUP_NAMESPACE = 0x2000ff01
|
||||
PIDFD_GET_IPC_NAMESPACE = 0x2000ff02
|
||||
PIDFD_GET_MNT_NAMESPACE = 0x2000ff03
|
||||
PIDFD_GET_NET_NAMESPACE = 0x2000ff04
|
||||
PIDFD_GET_PID_NAMESPACE = 0x2000ff05
|
||||
PIDFD_GET_PID_FOR_CHILDREN_NAMESPACE = 0x2000ff06
|
||||
PIDFD_GET_TIME_NAMESPACE = 0x2000ff07
|
||||
PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE = 0x2000ff08
|
||||
PIDFD_GET_USER_NAMESPACE = 0x2000ff09
|
||||
PIDFD_GET_UTS_NAMESPACE = 0x2000ff0a
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
@@ -728,22 +717,3 @@ type SysvShmDesc struct {
|
||||
const (
|
||||
GPIO_GET_CHIPINFO_IOCTL = 0x4044b401
|
||||
)
|
||||
|
||||
const (
|
||||
IPMICTL_SEND_COMMAND = 0x4028690d
|
||||
IPMICTL_RECEIVE_MSG = 0xc030690c
|
||||
)
|
||||
|
||||
type IPMIReq struct {
|
||||
Addr *uint8
|
||||
Len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
type IPMIRecv struct {
|
||||
Recv_type int32
|
||||
Addr *uint8
|
||||
Addr_len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
|
||||
+1
-31
@@ -704,18 +704,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
PIDFD_THREAD = 0x80
|
||||
PIDFD_GET_CGROUP_NAMESPACE = 0xff01
|
||||
PIDFD_GET_IPC_NAMESPACE = 0xff02
|
||||
PIDFD_GET_MNT_NAMESPACE = 0xff03
|
||||
PIDFD_GET_NET_NAMESPACE = 0xff04
|
||||
PIDFD_GET_PID_NAMESPACE = 0xff05
|
||||
PIDFD_GET_PID_FOR_CHILDREN_NAMESPACE = 0xff06
|
||||
PIDFD_GET_TIME_NAMESPACE = 0xff07
|
||||
PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE = 0xff08
|
||||
PIDFD_GET_USER_NAMESPACE = 0xff09
|
||||
PIDFD_GET_UTS_NAMESPACE = 0xff0a
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
@@ -807,22 +796,3 @@ const (
|
||||
const (
|
||||
GPIO_GET_CHIPINFO_IOCTL = 0x8044b401
|
||||
)
|
||||
|
||||
const (
|
||||
IPMICTL_SEND_COMMAND = 0x8028690d
|
||||
IPMICTL_RECEIVE_MSG = 0xc030690c
|
||||
)
|
||||
|
||||
type IPMIReq struct {
|
||||
Addr *uint8
|
||||
Len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
type IPMIRecv struct {
|
||||
Recv_type int32
|
||||
Addr *uint8
|
||||
Addr_len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
|
||||
+1
-31
@@ -700,18 +700,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
PIDFD_THREAD = 0x80
|
||||
PIDFD_GET_CGROUP_NAMESPACE = 0xff01
|
||||
PIDFD_GET_IPC_NAMESPACE = 0xff02
|
||||
PIDFD_GET_MNT_NAMESPACE = 0xff03
|
||||
PIDFD_GET_NET_NAMESPACE = 0xff04
|
||||
PIDFD_GET_PID_NAMESPACE = 0xff05
|
||||
PIDFD_GET_PID_FOR_CHILDREN_NAMESPACE = 0xff06
|
||||
PIDFD_GET_TIME_NAMESPACE = 0xff07
|
||||
PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE = 0xff08
|
||||
PIDFD_GET_USER_NAMESPACE = 0xff09
|
||||
PIDFD_GET_UTS_NAMESPACE = 0xff0a
|
||||
PIDFD_NONBLOCK = 0x800
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
@@ -742,22 +731,3 @@ type SysvShmDesc struct {
|
||||
const (
|
||||
GPIO_GET_CHIPINFO_IOCTL = 0x8044b401
|
||||
)
|
||||
|
||||
const (
|
||||
IPMICTL_SEND_COMMAND = 0x8028690d
|
||||
IPMICTL_RECEIVE_MSG = 0xc030690c
|
||||
)
|
||||
|
||||
type IPMIReq struct {
|
||||
Addr *uint8
|
||||
Len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
type IPMIRecv struct {
|
||||
Recv_type int32
|
||||
Addr *uint8
|
||||
Addr_len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
|
||||
+1
-31
@@ -681,18 +681,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PIDFD_NONBLOCK = 0x4000
|
||||
PIDFD_THREAD = 0x800
|
||||
PIDFD_GET_CGROUP_NAMESPACE = 0x2000ff01
|
||||
PIDFD_GET_IPC_NAMESPACE = 0x2000ff02
|
||||
PIDFD_GET_MNT_NAMESPACE = 0x2000ff03
|
||||
PIDFD_GET_NET_NAMESPACE = 0x2000ff04
|
||||
PIDFD_GET_PID_NAMESPACE = 0x2000ff05
|
||||
PIDFD_GET_PID_FOR_CHILDREN_NAMESPACE = 0x2000ff06
|
||||
PIDFD_GET_TIME_NAMESPACE = 0x2000ff07
|
||||
PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE = 0x2000ff08
|
||||
PIDFD_GET_USER_NAMESPACE = 0x2000ff09
|
||||
PIDFD_GET_UTS_NAMESPACE = 0x2000ff0a
|
||||
PIDFD_NONBLOCK = 0x4000
|
||||
)
|
||||
|
||||
type SysvIpcPerm struct {
|
||||
@@ -723,22 +712,3 @@ type SysvShmDesc struct {
|
||||
const (
|
||||
GPIO_GET_CHIPINFO_IOCTL = 0x4044b401
|
||||
)
|
||||
|
||||
const (
|
||||
IPMICTL_SEND_COMMAND = 0x4028690d
|
||||
IPMICTL_RECEIVE_MSG = 0xc030690c
|
||||
)
|
||||
|
||||
type IPMIReq struct {
|
||||
Addr *uint8
|
||||
Len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
type IPMIRecv struct {
|
||||
Recv_type int32
|
||||
Addr *uint8
|
||||
Addr_len uint32
|
||||
Msgid int64
|
||||
Msg IPMIMsg
|
||||
}
|
||||
|
||||
-1
@@ -1065,7 +1065,6 @@ const (
|
||||
SO_BROADCAST = 32
|
||||
SO_LINGER = 128
|
||||
SO_RCVBUF = 0x1002
|
||||
SO_SNDTIMEO = 0x1005
|
||||
SO_RCVTIMEO = 0x1006
|
||||
SO_SNDBUF = 0x1001
|
||||
SO_UPDATE_ACCEPT_CONTEXT = 0x700b
|
||||
|
||||
+7
-17
@@ -106,9 +106,6 @@ type Terminal struct {
|
||||
// a read. It aliases into inBuf.
|
||||
remainder []byte
|
||||
inBuf [256]byte
|
||||
// readErr is an error returned by a read that also returned data. It is
|
||||
// reported after all of that data has been processed.
|
||||
readErr error
|
||||
|
||||
// History records and retrieves lines of input read by [ReadLine] which
|
||||
// a user can retrieve and navigate using the up and down arrow keys.
|
||||
@@ -791,11 +788,7 @@ func (t *Terminal) ReadPassword(prompt string) (line string, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// ReadLine returns a line of input from the terminal, excluding the
|
||||
// trailing newline. It may return partial data along with an error.
|
||||
// An [io.EOF] error indicates the end of the stream. For other errors,
|
||||
// such as [ErrPasteIndicator] in bracketed paste mode, a subsequent
|
||||
// call may return more data.
|
||||
// ReadLine returns a line of input from the terminal.
|
||||
func (t *Terminal) ReadLine() (line string, err error) {
|
||||
t.lock.Lock()
|
||||
defer t.lock.Unlock()
|
||||
@@ -870,24 +863,21 @@ func (t *Terminal) readLine() (line string, err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
if t.readErr != nil {
|
||||
err = t.readErr
|
||||
t.readErr = nil
|
||||
return
|
||||
}
|
||||
|
||||
// t.remainder is a slice at the beginning of t.inBuf
|
||||
// containing a partial key sequence
|
||||
readBuf := t.inBuf[len(t.remainder):]
|
||||
var n int
|
||||
|
||||
t.lock.Unlock()
|
||||
n, readErr := t.c.Read(readBuf)
|
||||
n, err = t.c.Read(readBuf)
|
||||
t.lock.Lock()
|
||||
|
||||
t.remainder = t.inBuf[:n+len(t.remainder)]
|
||||
if readErr != nil {
|
||||
t.readErr = readErr
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
t.remainder = t.inBuf[:n+len(t.remainder)]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -696,16 +696,16 @@ golang.org/x/net/internal/socks
|
||||
golang.org/x/net/internal/timeseries
|
||||
golang.org/x/net/proxy
|
||||
golang.org/x/net/trace
|
||||
# golang.org/x/sys v0.48.0
|
||||
## explicit; go 1.26.0
|
||||
# golang.org/x/sys v0.47.0
|
||||
## explicit; go 1.25.0
|
||||
golang.org/x/sys/cpu
|
||||
golang.org/x/sys/execabs
|
||||
golang.org/x/sys/plan9
|
||||
golang.org/x/sys/unix
|
||||
golang.org/x/sys/windows
|
||||
golang.org/x/sys/windows/registry
|
||||
# golang.org/x/term v0.46.0
|
||||
## explicit; go 1.26.0
|
||||
# golang.org/x/term v0.45.0
|
||||
## explicit; go 1.25.0
|
||||
golang.org/x/term
|
||||
# golang.org/x/text v0.39.0
|
||||
## explicit; go 1.25.0
|
||||
|
||||
Reference in New Issue
Block a user