Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion sysfs/class_sas_phy.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
package sysfs

import (
"errors"
"fmt"
"os"
"path/filepath"
"strconv"
"strings"
"syscall"

"github.com/prometheus/procfs/internal/util"
)
Expand Down Expand Up @@ -97,7 +99,7 @@ func (fs FS) parseSASPhy(name string) (*SASPhy, error) {
if fileinfo.Mode().IsRegular() {
value, err := util.SysReadFile(name)
if err != nil {
if os.IsPermission(err) {
if os.IsPermission(err) || errors.Is(err, syscall.EINVAL) {
continue
}
return nil, fmt.Errorf("failed to read file %q: %w", name, err)
Expand Down