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 <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2021-11-30 12:21:52 -08:00
parent 3d86d31b9f
commit dffb8db7e1
+1 -2
View File
@@ -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