qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block: Set cdrom device read only flag
@ 2012-08-02  1:32 Kevin Shanahan
  2012-08-02  2:16 ` Kevin Shanahan
  0 siblings, 1 reply; 14+ messages in thread
From: Kevin Shanahan @ 2012-08-02  1:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf

Set the block driver read_only flag for cdrom devices so that
qmp_change_blockdev does not attempt to open cdrom files in read-write
mode when changing media.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
---
Proposed fix for https://bugs.launchpad.net/qemu/+bug/1027525

diff -urN qemu-kvm-1.1.1.orig/blockdev.c qemu-kvm-1.1.1/blockdev.c
--- qemu-kvm-1.1.1.orig/blockdev.c	2012-07-16 17:22:03.000000000 +0930
+++ qemu-kvm-1.1.1/blockdev.c	2012-08-02 10:28:40.000000000 +0930
@@ -565,6 +565,7 @@
 	    break;
 	case MEDIA_CDROM:
             dinfo->media_cd = 1;
+            dinfo->bdrv->read_only = 1;
 	    break;
 	}
         break;

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-09-20  8:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-02  1:32 [Qemu-devel] [PATCH] block: Set cdrom device read only flag Kevin Shanahan
2012-08-02  2:16 ` Kevin Shanahan
2012-08-02  5:19   ` Kevin Shanahan
2012-08-02  7:20     ` Kevin Shanahan
2012-08-06 10:07       ` Kevin Wolf
2012-08-07  8:47         ` Markus Armbruster
2012-08-07  9:46           ` ronnie sahlberg
2012-08-07 11:54             ` Markus Armbruster
2012-08-09  8:42           ` Kevin Wolf
2012-08-12  2:48             ` Kevin Shanahan
2012-08-13  7:54               ` Kevin Wolf
2012-08-13 11:57                 ` Markus Armbruster
2012-08-13 13:20                   ` Kevin Wolf
2012-09-20  8:22                 ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).