Remove obsolete skipRoot flag in LXC driver

The lxcContainerMountAllFS method had a 'bool skipRoot'
flag to control whether it mounts the / filesystem. Since
removal of the non-pivot root container setup codepaths,
this flag is obsolete as the only caller always passes
'true'.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2013-05-15 10:53:15 +01:00 committed by Michal Privoznik
parent 31453a837b
commit 7bb7510de7

View File

@ -1333,16 +1333,14 @@ static int lxcContainerMountFS(virDomainFSDefPtr fs,
static int lxcContainerMountAllFS(virDomainDefPtr vmDef,
bool skipRoot,
char *sec_mount_options)
{
size_t i;
VIR_DEBUG("Mounting %d", skipRoot);
VIR_DEBUG("Mounting all non-root filesystems");
/* Pull in rest of container's mounts */
for (i = 0 ; i < vmDef->nfss ; i++) {
if (skipRoot &&
STREQ(vmDef->fss[i]->dst, "/"))
if (STREQ(vmDef->fss[i]->dst, "/"))
continue;
if (lxcContainerUnmountSubtree(vmDef->fss[i]->dst,
@ -1353,7 +1351,7 @@ static int lxcContainerMountAllFS(virDomainDefPtr vmDef,
return -1;
}
VIR_DEBUG("Mounted all filesystems");
VIR_DEBUG("Mounted all non-root filesystems");
return 0;
}
@ -1791,7 +1789,7 @@ static int lxcContainerSetupPivotRoot(virDomainDefPtr vmDef,
goto cleanup;
/* Sets up any non-root mounts from guest config */
if (lxcContainerMountAllFS(vmDef, true, sec_mount_options) < 0)
if (lxcContainerMountAllFS(vmDef, sec_mount_options) < 0)
goto cleanup;
/* Sets up any extra disks from guest config */