[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] libxl: correct xenstore entry for empty cdrom



commit bc6a499ebcf102060987fb845c1450a38de441c7
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Wed Feb 15 12:11:12 2017 +0100
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Thu Feb 16 12:47:07 2017 +0000

    libxl: correct xenstore entry for empty cdrom
    
    Specifying an empty cdrom device will result in a Xenstore entry
    
    params = aio:(null)
    
    as the physical device path isn't existing. This lets a domain booted
    via OVMF hang as OVMF is checking for "aio:" only in order to detect
    the empty cdrom case.
    
    Use an empty string for the physical device path in this case. As a
    cdrom device for HVM is always backed by qdisk we only need to cover this
    backend.
    
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/libxl/libxl_disk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/libxl/libxl_disk.c b/tools/libxl/libxl_disk.c
index ac49df2..63de75c 100644
--- a/tools/libxl/libxl_disk.c
+++ b/tools/libxl/libxl_disk.c
@@ -359,7 +359,8 @@ static void device_disk_add(libxl__egc *egc, uint32_t domid,
             case LIBXL_DISK_BACKEND_QDISK:
                 flexarray_append(back, "params");
                 flexarray_append(back, GCSPRINTF("%s:%s",
-                              
libxl__device_disk_string_of_format(disk->format), disk->pdev_path));
+                              
libxl__device_disk_string_of_format(disk->format),
+                              disk->pdev_path ? : ""));
                 if (libxl_defbool_val(disk->colo_enable)) {
                     flexarray_append(back, "colo-host");
                     flexarray_append(back, libxl__sprintf(gc, "%s", 
disk->colo_host));
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.