Merge branch 'shirou:master' into master

pull/1824/head
Cnpt 8 months ago committed by GitHub
commit b3b6b01a00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -19,7 +19,7 @@ jobs:
id: sbom id: sbom
env: env:
GITHUB_TOKEN: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }}
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with: with:
path: ${{steps.sbom.outputs.fileName }} path: ${{steps.sbom.outputs.fileName }}
name: "SBOM" name: "SBOM"

@ -133,7 +133,7 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro
uintptr(unsafe.Pointer(&lpFileSystemNameBuffer[0])), uintptr(unsafe.Pointer(&lpFileSystemNameBuffer[0])),
uintptr(len(lpFileSystemNameBuffer))) uintptr(len(lpFileSystemNameBuffer)))
if driveret == 0 { if driveret == 0 {
if typeret == 5 || typeret == 2 { if typeret == 2 || typeret == 4 || typeret == 5 {
continue // device is not ready will happen if there is no disk in the drive continue // device is not ready will happen if there is no disk in the drive
} }
warnings.Add(err) warnings.Add(err)

@ -6,6 +6,7 @@ package process
import ( import (
"bytes" "bytes"
"context" "context"
"errors"
"path/filepath" "path/filepath"
"strconv" "strconv"
"strings" "strings"
@ -329,7 +330,7 @@ func (p *Process) getKProc() (*KinfoProc, error) {
return nil, err return nil, err
} }
if length != sizeOfKinfoProc { if length != sizeOfKinfoProc {
return nil, err return nil, errors.New("unexpected size of KinfoProc")
} }
k, err := parseKinfoProc(buf) k, err := parseKinfoProc(buf)

@ -7,6 +7,7 @@ import (
"bytes" "bytes"
"context" "context"
"encoding/binary" "encoding/binary"
"errors"
"fmt" "fmt"
"io" "io"
"path/filepath" "path/filepath"
@ -343,7 +344,7 @@ func (p *Process) getKProc() (*KinfoProc, error) {
return nil, err return nil, err
} }
if length != sizeOfKinfoProc { if length != sizeOfKinfoProc {
return nil, err return nil, errors.New("unexpected size of KinfoProc")
} }
k, err := parseKinfoProc(buf) k, err := parseKinfoProc(buf)

Loading…
Cancel
Save