+Thu Apr 16 14:05:28 GMT 2009 Mark McLoughlin <markmc@redhat.com>
+
+ * src/lxc_container.c: syntax-check fixes
+
Wed Apr 15 22:40:50 CEST 2009 Daniel Veillard <veillard@redhat.com>
* docs/Makefile.am docs/api.html docs/api.html.in docs/archdomain.html
static int lxcContainerPivotRoot(virDomainFSDefPtr root)
{
- int rc;
+ int rc, ret;
char *oldroot = NULL, *newroot = NULL;
+ ret = -1;
+
/* root->parent must be private, so make / private. */
if (mount("", "/", NULL, MS_PRIVATE|MS_REC, NULL) < 0) {
virReportSystemError(NULL, errno, "%s",
oldroot);
goto err;
}
-
+
/* Create a directory called 'new' in tmpfs */
if (virAsprintf(&newroot, "%s/new", oldroot) < 0) {
virReportOOMError(NULL);
goto err;
}
+ ret = 0;
+
+err:
VIR_FREE(oldroot);
VIR_FREE(newroot);
- return 0;
-
-err:
- if (oldroot) VIR_FREE(oldroot);
- if (newroot) VIR_FREE(newroot);
- return -1;
+ return ret;
}
static int lxcContainerPopulateDevices(void)