]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
conf: use disk source accessors in uml/
authorEric Blake <eblake@redhat.com>
Tue, 18 Mar 2014 20:00:03 +0000 (14:00 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 24 Mar 2014 17:59:50 +0000 (11:59 -0600)
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>
src/uml/uml_conf.c
src/uml/uml_driver.c

index 53a880f1cc5ab353e9c98e31d104544fb741fbdf..bf19ee7eb122dc20fe524f66e56362c256a21fa1 100644 (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++) {
index f5eb05f42ffb30dc3ef2fa47b0ade460c1463c00..1ab79fc1bcc7fc81f837828a9c26b6f5d7b07e6b 100644 (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)