Merge pull request #936 from macrosheep/set-criupath-helper

libcontainer: Add a helper func to set CriuPath
This commit is contained in:
Qiang Huang
2016-07-18 09:37:47 +08:00
committed by GitHub
2 changed files with 10 additions and 4 deletions
+1 -4
View File
@@ -38,10 +38,7 @@ func loadFactory(context *cli.Context) (libcontainer.Factory, error) {
return nil, fmt.Errorf("systemd cgroup flag passed, but systemd support for managing cgroups is not available")
}
}
return libcontainer.New(abs, cgroupManager, func(l *libcontainer.LinuxFactory) error {
l.CriuPath = context.GlobalString("criu")
return nil
})
return libcontainer.New(abs, cgroupManager, libcontainer.CriuPath(context.GlobalString("criu")))
}
// getContainer returns the specified container instance by loading it from state