mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00:00
conf: use disk source accessors in uml/
Part of a series of cleanups to use new accessor methods. * src/uml/uml_conf.c (umlBuildCommandLine): Use accessors. * src/uml/uml_driver.c (umlDomainAttachUmlDisk): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
2aad0ebe2d
commit
8082d9bbda
@ -411,7 +411,7 @@ virCommandPtr umlBuildCommandLine(virConnectPtr conn,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
virCommandAddArgPair(cmd, disk->dst, disk->src);
|
virCommandAddArgPair(cmd, disk->dst, virDomainDiskGetSource(disk));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < vm->def->nnets; i++) {
|
for (i = 0; i < vm->def->nnets; i++) {
|
||||||
|
@ -2166,13 +2166,14 @@ static int umlDomainAttachUmlDisk(struct uml_driver *driver,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!disk->src) {
|
if (!virDomainDiskGetSource(disk)) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
"%s", _("disk source path is missing"));
|
"%s", _("disk source path is missing"));
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virAsprintf(&cmd, "config %s=%s", disk->dst, disk->src) < 0)
|
if (virAsprintf(&cmd, "config %s=%s", disk->dst,
|
||||||
|
virDomainDiskGetSource(disk)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (umlMonitorCommand(driver, vm, cmd, &reply) < 0)
|
if (umlMonitorCommand(driver, vm, cmd, &reply) < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user