mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user