Skip to content

Commit 061e1a1

Browse files
committed
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 <[email protected]>
1 parent 1739b71 commit 061e1a1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/rctl/rctl.go renamed to pkg/rctl/rctl_freebsd.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//go:build freebsd
2-
31
package rctl
42

53
import (
@@ -25,7 +23,7 @@ func GetRacct(filter string) (map[string]uint64, error) {
2523
uintptr(unsafe.Pointer(&buf[0])),
2624
uintptr(len(buf)), 0, 0)
2725
if errno != 0 {
28-
return nil, fmt.Errorf("error calling rctl_get_racct with filter %s: %v", errno)
26+
return nil, fmt.Errorf("error calling rctl_get_racct with filter %s: %v", filter, errno)
2927
}
3028
len := bytes.IndexByte(buf[:], byte(0))
3129
entries := strings.Split(string(buf[:len]), ",")

0 commit comments

Comments
 (0)