mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-24 13:48:56 +08:00
[disk][freebsd] handle SerialNumberWithContext scanner errors
This commit is contained in:
parent
0d33df272b
commit
31c410026d
@ -186,6 +186,9 @@ func SerialNumberWithContext(ctx context.Context, name string) (string, error) {
|
||||
break
|
||||
}
|
||||
}
|
||||
if err = s.Err(); err != nil {
|
||||
return "", err
|
||||
}
|
||||
return serial, nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user