[PATCH 3/4] Remove obsolete skipRoot flag in LXC driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 src/lxc/lxc_container.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 1ebb625..8bad314 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -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 */
-- 
1.8.2.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]