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:
Eric Blake 2014-03-18 14:00:03 -06:00
parent 2aad0ebe2d
commit 8082d9bbda
2 changed files with 4 additions and 3 deletions

View File

@ -411,7 +411,7 @@ virCommandPtr umlBuildCommandLine(virConnectPtr conn,
goto error;
}
virCommandAddArgPair(cmd, disk->dst, disk->src);
virCommandAddArgPair(cmd, disk->dst, virDomainDiskGetSource(disk));
}
for (i = 0; i < vm->def->nnets; i++) {

View File

@ -2166,13 +2166,14 @@ static int umlDomainAttachUmlDisk(struct uml_driver *driver,
}
}
if (!disk->src) {
if (!virDomainDiskGetSource(disk)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("disk source path is missing"));
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;
if (umlMonitorCommand(driver, vm, cmd, &reply) < 0)