mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Refactor loop device setup code in LXC
Minor re-factoring of code for setting up loop devices in the LXC controller Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
82793a2a55
commit
f0bfb6302d
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user