mirror of https://github.com/containers/podman.git
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:
parent
1739b7170e
commit
061e1a17a9
|
@ -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]), ",")
|
Loading…
Reference in New Issue