Marek Marczykowski
2011-Sep-30 09:54 UTC
[Xen-devel] [PATCH] libxl: fix block attach with non-dom0 backend
libxl: fix block attach with non-dom0 backend When backend!=dom0 there is no simple way to get major:minor numbers. So just no verify it and leave filling it to hotplug script (as xend does). Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -959,9 +959,11 @@ int libxl_device_disk_add(libxl_ctx *ctx case LIBXL_DISK_BACKEND_PHY: dev = disk->pdev_path; do_backend_phy: - libxl__device_physdisk_major_minor(dev, &major, &minor); - flexarray_append(back, "physical-device"); - flexarray_append(back, libxl__sprintf(&gc, "%x:%x", major, minor)); + if (disk->backend_domid == 0) { + libxl__device_physdisk_major_minor(dev, &major, &minor); + flexarray_append(back, "physical-device"); + flexarray_append(back, libxl__sprintf(&gc, "%x:%x", major, minor)); + } flexarray_append(back, "params"); flexarray_append(back, dev); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel