Merge pull request #5323 from jongwu/fix_bps_limit

run: fix GetList return empty issue for throttledevice
This commit is contained in:
Sebastiaan van Stijn 2024-08-09 19:46:23 +02:00 committed by GitHub
commit 471862b122
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ func (opt *ThrottledeviceOpt) String() string {
// GetList returns a slice of pointers to ThrottleDevices. // GetList returns a slice of pointers to ThrottleDevices.
func (opt *ThrottledeviceOpt) GetList() []*blkiodev.ThrottleDevice { func (opt *ThrottledeviceOpt) GetList() []*blkiodev.ThrottleDevice {
out := make([]*blkiodev.ThrottleDevice, 0, len(opt.values)) out := make([]*blkiodev.ThrottleDevice, len(opt.values))
copy(out, opt.values) copy(out, opt.values)
return out return out
} }