]> xenbits.xensource.com Git - xen.git/commitdiff
libxl: explicitly set disk format in libxl__append_disk_list_of_type
authorIan Campbell <ian.campbell@citrix.com>
Tue, 5 Apr 2011 16:21:36 +0000 (17:21 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 5 Apr 2011 16:21:36 +0000 (17:21 +0100)
Ideally we should be able to infer the format from something stashed
in xenstore but this is better than letting users see garbage values.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl.c

index 3831d8859fb0d87b5995b6afcbb84391aad777dd..41a0af9a6e0a53e5b499a7c0356dc634cd14ca5b 100644 (file)
@@ -1778,6 +1778,7 @@ static unsigned int libxl__append_disk_list_of_type(libxl__gc *gc,
                 pdisk->readwrite = 0;
             type = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, "%s/device-type", libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, "%s/%s/frontend", be_path, *dir))));
             pdisk->is_cdrom = !strcmp(type, "cdrom");
+            pdisk->format = DISK_FORMAT_UNKNOWN;
         }
     }