提交 f0bfb630 编写于 作者: D Daniel P. Berrange

Refactor loop device setup code in LXC

Minor re-factoring of code for setting up loop devices in
the LXC controller
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 82793a2a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册