]> xenbits.xensource.com Git - libvirt.git/commitdiff
Remove obsolete skipRoot flag in LXC driver
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 15 May 2013 09:53:15 +0000 (10:53 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 15 May 2013 15:29:35 +0000 (17:29 +0200)
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>
src/lxc/lxc_container.c

index 1ebb625a08608fe3afecfe8a3fa8eaa46be0fbfc..8bad3144f4958de4a59766bbd6bd09bc69485c58 100644 (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 */