From 252e94f49952318ef777aefff9a6a8e9b71029e5 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 30 Jun 2023 01:31:51 +0200 Subject: [PATCH] pkg/fileutils: GetTotalUsedFds(): don't pretend to support FreeBSD Commit 8d56108ffb4e334600377c4bb4471eecec7b825c moved this function from the generic (no build-tags) fileutils.go to a unix file, adding "freebsd" to the build-tags. This likely was a wrong assumption (as other files had freebsd build-tags). FreeBSD's procfs does not mention `/proc//fd` in the manpage, and we don't test FreeBSD in CI, so let's drop it, and make this a Linux-only file. While updating also dropping the import-tag, as we're planning to move this file internal to the daemon. Signed-off-by: Sebastiaan van Stijn --- pkg/fileutils/{fileutils_unix.go => fileutils_linux.go} | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) rename pkg/fileutils/{fileutils_unix.go => fileutils_linux.go} (80%) diff --git a/pkg/fileutils/fileutils_unix.go b/pkg/fileutils/fileutils_linux.go similarity index 80% rename from pkg/fileutils/fileutils_unix.go rename to pkg/fileutils/fileutils_linux.go index ab8e03a9a0..37611c975c 100644 --- a/pkg/fileutils/fileutils_unix.go +++ b/pkg/fileutils/fileutils_linux.go @@ -1,6 +1,4 @@ -//go:build linux || freebsd - -package fileutils // import "github.com/docker/docker/pkg/fileutils" +package fileutils import ( "context"