Update disk/disk_linux.go

Co-authored-by: shirou <shirou.faw@gmail.com>
pull/1508/head
Greg 2 years ago committed by GitHub
parent 0ca6266393
commit aa4c84c6b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -478,7 +478,7 @@ func IOCountersWithContext(ctx context.Context, names ...string) (map[string]IOC
// Since `name`` here is already a basename, re-add a hardcoded /dev path.
// This is not ideal, but we may break the API by changing how SerialNumberWithContext
// works.
d.SerialNumber, _ = SerialNumberWithContext(ctx, "/dev/"+name)
d.SerialNumber, _ = SerialNumberWithContext(ctx, common.HostDevWithContext(ctx, name))
d.Label, _ = LabelWithContext(ctx, name)
ret[name] = d

Loading…
Cancel
Save