|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 4 of 7] libxl: only a CDROM type disk can be empty
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1302167211 -3600
# Node ID cbf6ec01faef6502845d8201a717edc9fa6fae52
# Parent f5418873be3d097cbb374009898ce9c74255e047
libxl: only a CDROM type disk can be empty.
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
diff -r f5418873be3d -r cbf6ec01faef tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Thu Apr 07 10:06:36 2011 +0100
+++ b/tools/libxl/libxl.c Thu Apr 07 10:06:51 2011 +0100
@@ -908,8 +908,13 @@ static int validate_virtual_disk(libxl__
struct stat stat_buf;
char *delimiter;
- if (disk->format == DISK_FORMAT_EMPTY)
- return 0;
+ if (disk->format == DISK_FORMAT_EMPTY) {
+ if (disk->is_cdrom)
+ return 0;
+ LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Empty disk %s is not a CDROM
device\n",
+ disk->vdev);
+ return ERROR_INVAL;
+ }
if (disk->format == DISK_FORMAT_RAW) {
delimiter = strchr(file_name, ':');
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|