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

[libvirt] [PATCH] Refactor loop device setup code in LXC



From: "Daniel P. Berrange" <berrange redhat com>

Minor re-factoring of code for setting up loop devices in
the LXC controller

Signed-off-by: Daniel P. Berrange <berrange redhat com>
---
 src/lxc/lxc_controller.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 78e8a70..a7e715e 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -383,12 +383,13 @@ static int virLXCControllerSetupLoopDevices(virLXCControllerPtr ctrl)
     int ret = -1;
 
     for (i = 0 ; i < ctrl->def->nfss ; i++) {
+        virDomainFSDefPtr fs = ctrl->def->fss[i];
         int fd;
 
-        if (ctrl->def->fss[i]->type != VIR_DOMAIN_FS_TYPE_FILE)
+        if (fs->type != VIR_DOMAIN_FS_TYPE_FILE)
             continue;
 
-        fd = virLXCControllerSetupLoopDevice(ctrl->def->fss[i]);
+        fd = virLXCControllerSetupLoopDevice(fs);
         if (fd < 0)
             goto cleanup;
 
-- 
1.7.11.7


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