[lxc-devel] [PATCH 1/2] Simplify function

2015-10-25 Thread Christian Brauner
Instead of duplicating the cleanup-code, once for success and once for failure, simply keep a variable fret which is -1 in the beginning and gets set to 0 on success or stays -1 on failure. Signed-off-by: Christian Brauner --- src/lxc/conf.c | 14 ++ 1

[lxc-devel] [PATCH 2/2] Create random workdir for overlay mounts

2015-10-25 Thread Christian Brauner
When no explicit workdir is given we simply create a random workdir using mkdtemp(). Signed-off-by: Christian Brauner --- src/lxc/conf.c | 31 --- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/src/lxc/conf.c

[lxc-devel] [PATCH 0/2] Create random workdir for overlay mounts

2015-10-25 Thread Christian Brauner
- When no explicit workdir is given we simply create a random workdir using mkdtemp(). - The temporary workdir is not removed when the container stops as it is not obvious to me at this point how to do this cleanly. This means that it is left to the user to clean up old random workdirs. I