From 1b34494b2fc9572d6c8f6d6492d8088dde73d461 Mon Sep 17 00:00:00 2001 From: bin Date: Sat, 5 Mar 2022 10:27:32 +0800 Subject: [PATCH] runtime: fix invalid comments for pkg/resourcecontrol Some comments are copied and not adjusted to the pkg/resourcecontrol package. Fixes: #3835 Signed-off-by: bin --- src/runtime/pkg/resourcecontrol/controller.go | 4 ++-- src/runtime/pkg/resourcecontrol/utils_linux.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/pkg/resourcecontrol/controller.go b/src/runtime/pkg/resourcecontrol/controller.go index 1ffba476b8..11dafd0e28 100644 --- a/src/runtime/pkg/resourcecontrol/controller.go +++ b/src/runtime/pkg/resourcecontrol/controller.go @@ -22,14 +22,14 @@ func SetLogger(logger *logrus.Entry) { controllerLogger = logger.WithFields(fields) } -// HypervisorType describes an hypervisor type. +// ResourceControllerType describes a resource controller type. type ResourceControllerType string const ( LinuxCgroups ResourceControllerType = "cgroups" ) -// String converts an hypervisor type to a string. +// String converts a resource type to a string. func (rType *ResourceControllerType) String() string { switch *rType { case LinuxCgroups: diff --git a/src/runtime/pkg/resourcecontrol/utils_linux.go b/src/runtime/pkg/resourcecontrol/utils_linux.go index 73d77dc235..f72890889f 100644 --- a/src/runtime/pkg/resourcecontrol/utils_linux.go +++ b/src/runtime/pkg/resourcecontrol/utils_linux.go @@ -20,7 +20,7 @@ import ( // DefaultResourceControllerID runtime-determined location in the cgroups hierarchy. const DefaultResourceControllerID = "/vc" -// validCgroupPath returns a valid cgroup path. +// ValidCgroupPath returns a valid cgroup path. // see https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#cgroups-path func ValidCgroupPath(path string, systemdCgroup bool) (string, error) { if IsSystemdCgroup(path) {