diff mbox

[v2] libxl: fix disk listing function

Message ID 20170914153811.30588-1-wei.liu2@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Liu Sept. 14, 2017, 3:38 p.m. UTC
The path should be "vbd" not "disk".

Fixes fbbaf2cc9 ("libxl: change disk to use generic getting list
functions").

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Oleksandr Grytsov <oleksandr_grytsov@epam.com>

This should unblock staging.
---
 tools/libxl/libxl_checkpoint_device.c | 2 +-
 tools/libxl/libxl_disk.c              | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Ian Jackson Sept. 14, 2017, 3:40 p.m. UTC | #1
Wei Liu writes ("[PATCH v2] libxl: fix disk listing function"):
> The path should be "vbd" not "disk".
> 
> Fixes fbbaf2cc9 ("libxl: change disk to use generic getting list
> functions").

Oops!

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
diff mbox

Patch

diff --git a/tools/libxl/libxl_checkpoint_device.c b/tools/libxl/libxl_checkpoint_device.c
index d1cc155955..ef212e4051 100644
--- a/tools/libxl/libxl_checkpoint_device.c
+++ b/tools/libxl/libxl_checkpoint_device.c
@@ -68,7 +68,7 @@  void libxl__checkpoint_devices_setup(libxl__egc *egc,
 
     if (cds->device_kind_flags & (1 << LIBXL__DEVICE_KIND_VBD))
         cds->disks = libxl__device_list(gc, &libxl__disk_devtype, cds->domid,
-                                        "disk", &cds->num_disks);
+                                        "vbd", &cds->num_disks);
 
     if (cds->num_nics == 0 && cds->num_disks == 0)
         goto out;
diff --git a/tools/libxl/libxl_disk.c b/tools/libxl/libxl_disk.c
index cfa5e8ae69..06dd4d3193 100644
--- a/tools/libxl/libxl_disk.c
+++ b/tools/libxl/libxl_disk.c
@@ -628,7 +628,7 @@  libxl_device_disk *libxl_device_disk_list(libxl_ctx *ctx, uint32_t domid, int *n
 
     GC_INIT(ctx);
 
-    r = libxl__device_list(gc, &libxl__disk_devtype, domid, "disk", num);
+    r = libxl__device_list(gc, &libxl__disk_devtype, domid, "vbd", num);
 
     GC_FREE;
 
@@ -741,7 +741,7 @@  int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk,
         goto out;
     }
 
-    disks = libxl__device_list(gc, &libxl__disk_devtype, domid, "disk", &num);
+    disks = libxl__device_list(gc, &libxl__disk_devtype, domid, "vbd", &num);
     for (i = 0; i < num; i++) {
         if (disks[i].is_cdrom && !strcmp(disk->vdev, disks[i].vdev))
         {