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
env:
GITHUB_TOKEN: ${{ github.token }}
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
path: ${{steps.sbom.outputs.fileName }}
name: "SBOM"

@ -133,7 +133,7 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro
uintptr(unsafe.Pointer(&lpFileSystemNameBuffer[0])),
uintptr(len(lpFileSystemNameBuffer)))
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
}
warnings.Add(err)

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

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

Loading…
Cancel
Save