Skip to contentSkip to conversation

Missing CDROM media (w/Signed-off-by)

PATCH In review Ross Maxfield 2 participants 2 messages Apr 11, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Missing CDROM media (w/Signed-off-by)

All,
Being a neophyte to open-source checkins, I apologize for the failure to include the 'Signed-off-by' statement, and resubmit the missing-media patch in conformation.

- Ross

tools/ioemu/vl.c +11 -2
Index: xen-3.0-testing/tools/ioemu/vl.c
===================================================================
@@ -3243,8 +3243,17 @@ int main(int argc, char **argv)
     /* we always create the cdrom drive, even if no disk is there */
     bdrv_init();
     if (has_cdrom) {
-        bs_table[2] = bdrv_new("cdrom");
-        bdrv_set_type_hint(bs_table[2], BDRV_TYPE_CDROM);
+	int fd;
+        if ( (fd = open(hd_filename[2], O_RDONLY | O_BINARY)) < 0) {
+  		fprintf(stderr, "Could not open CD %s.\n", hd_filename[i]);
+		hd_filename[2]=NULL;
+		bs_table[2]=NULL;
+	}
+	else {
+		close(fd);
+	        bs_table[2] = bdrv_new("cdrom");
+	        bdrv_set_type_hint(bs_table[2], BDRV_TYPE_CDROM);
+	}
     }
 
     /* open the virtual block devices */

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

Thanks!

Regards,

Anthony Liguori

Quoted 15 lines · Ross Maxfield

All,
Being a neophyte to open-source checkins, I apologize for the failure to include the 'Signed-off-by' statement, and resubmit the missing-media patch in conformation.

- Ross

------------------------------------------------------------------------

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel