From 061e1a17a987080005b097a196c6631b04902578 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Sat, 29 Mar 2025 23:27:30 -0700 Subject: [PATCH] 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 --- pkg/rctl/{rctl.go => rctl_freebsd.go} | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) rename pkg/rctl/{rctl.go => rctl_freebsd.go} (95%) diff --git a/pkg/rctl/rctl.go b/pkg/rctl/rctl_freebsd.go similarity index 95% rename from pkg/rctl/rctl.go rename to pkg/rctl/rctl_freebsd.go index 75588c79c6..2615aff74d 100644 --- a/pkg/rctl/rctl.go +++ b/pkg/rctl/rctl_freebsd.go @@ -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]), ",")