1
0
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:
Ville Skyttä 2022-01-10 23:53:35 +02:00
parent 0d33df272b
commit 31c410026d

View File

@ -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
}