projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07108b2
)
read-only: Another minor cleanup
author
Naphtali Sprei
<nsprei@redhat.com>
Thu, 11 Mar 2010 14:44:34 +0000
(16:44 +0200)
committer
Anthony Liguori
<aliguori@us.ibm.com>
Wed, 17 Mar 2010 16:16:15 +0000
(11:16 -0500)
Don't rely on CDROM hint for read_only attribute
Signed-off-by: Naphtali Sprei <nsprei@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/scsi-disk.c
patch
|
blob
|
history
diff --git
a/hw/scsi-disk.c
b/hw/scsi-disk.c
index e64fbf11ddb24650e2ffb83e9dec5b28c301a1c0..1fbd4ee1bb5d40591a43609f5622ca283e796ee8 100644
(file)
--- a/
hw/scsi-disk.c
+++ b/
hw/scsi-disk.c
@@
-613,8
+613,7
@@
static int scsi_disk_emulate_mode_sense(SCSIRequest *req, uint8_t *outbuf)
p[1] = 0; /* Default media type. */
p[3] = 0; /* Block descriptor length. */
- if (bdrv_get_type_hint(s->bs) == BDRV_TYPE_CDROM ||
- bdrv_is_read_only(s->bs)) {
+ if (bdrv_is_read_only(s->bs)) {
p[2] = 0x80; /* Readonly. */
}
p += 4;