We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c15f44e + 34f50e5 commit 96c346eCopy full SHA for 96c346e
utils/sysfs/sysfs.go
@@ -254,10 +254,8 @@ func (fs *realSysFs) IsBlockDeviceHidden(name string) (bool, error) {
254
if err != nil {
255
return false, fmt.Errorf("failed to read %s: %w", devHiddenPath, err)
256
}
257
- if string(hidden) == "1" {
258
- return true, nil
259
- }
260
- return false, nil
+
+ return strings.TrimSpace(string(hidden)) == "1", nil
261
262
263
func (fs *realSysFs) GetBlockDeviceScheduler(name string) (string, error) {
0 commit comments