From dffb8db7e1bba94cf48cc59af47014501393d35e Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 30 Nov 2021 12:21:52 -0800 Subject: [PATCH] libct: handleCriuConfigurationFile: use utils.SearchLabels The utils.Annotations was used here before only because it made it possible to distinguish between "key not found" and "empty value" cases. With the previous commit, utils.SearchLabels can do that, and so it makes sense to use it. Signed-off-by: Kir Kolyshkin --- libcontainer/container_linux.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libcontainer/container_linux.go b/libcontainer/container_linux.go index f6877b742..9f3c7eb2c 100644 --- a/libcontainer/container_linux.go +++ b/libcontainer/container_linux.go @@ -881,8 +881,7 @@ func (c *linuxContainer) handleCriuConfigurationFile(rpcOpts *criurpc.CriuOpts) // Look for annotations. The annotation 'org.criu.config' // specifies if CRIU should use a different, container specific // configuration file. - _, annotations := utils.Annotations(c.config.Labels) - configFile, exists := annotations["org.criu.config"] + configFile, exists := utils.SearchLabels(c.config.Labels, "org.criu.config") if exists { // If the annotation 'org.criu.config' exists and is set // to a non-empty string, tell CRIU to use that as a