mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +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;
|
int ret = -1;
|
||||||
|
|
||||||
for (i = 0 ; i < ctrl->def->nfss ; i++) {
|
for (i = 0 ; i < ctrl->def->nfss ; i++) {
|
||||||
|
virDomainFSDefPtr fs = ctrl->def->fss[i];
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
if (ctrl->def->fss[i]->type != VIR_DOMAIN_FS_TYPE_FILE)
|
if (fs->type != VIR_DOMAIN_FS_TYPE_FILE)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
fd = virLXCControllerSetupLoopDevice(ctrl->def->fss[i]);
|
fd = virLXCControllerSetupLoopDevice(fs);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user