]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/start.c
start, utils: improve preserve_ns()
authorChristian Brauner <christian.brauner@canonical.com>
Sat, 29 Oct 2016 14:58:48 +0000 (16:58 +0200)
committerChristian Brauner <christian.brauner@canonical.com>
Sat, 19 Nov 2016 04:11:36 +0000 (05:11 +0100)
commit4d8ac866fc29a555531029fec797ce7125dd0701
tree5f09457121425c9270211608bbe6e57468738857
parent358daf49c0627d382a21fc03464464520218c8fa
start, utils: improve preserve_ns()

- Allocating an error message that the caller must free seems pointless. We can
  just print the error message in preserve_ns() itself. This also allows us to
  avoid using the GNU extension asprintf().
- Improve lxc_preserve_ns(): By passing in NULL or "" as the second argument
  the function can now also be used to check whether namespaces are supported
  by the kernel.
- Use lxc_preserve_ns() in preserve_ns().

Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
src/lxc/start.c
src/lxc/utils.c