mirror of
https://github.com/containers/podman.git
synced 2025-10-13 01:06:10 +08:00
pkg/rctl: fix fprintf statement
While at it, rename the file to have freebsd suffix instead of using a go:build annotation. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
//go:build freebsd
|
||||
|
||||
package rctl
|
||||
|
||||
import (
|
||||
@ -25,7 +23,7 @@ func GetRacct(filter string) (map[string]uint64, error) {
|
||||
uintptr(unsafe.Pointer(&buf[0])),
|
||||
uintptr(len(buf)), 0, 0)
|
||||
if errno != 0 {
|
||||
return nil, fmt.Errorf("error calling rctl_get_racct with filter %s: %v", errno)
|
||||
return nil, fmt.Errorf("error calling rctl_get_racct with filter %s: %v", filter, errno)
|
||||
}
|
||||
len := bytes.IndexByte(buf[:], byte(0))
|
||||
entries := strings.Split(string(buf[:len]), ",")
|
Reference in New Issue
Block a user