提交 0056dcc1 编写于 作者: N Naphtali Sprei 提交者: Anthony Liguori

read-only: Another minor cleanup

Don't rely on CDROM hint for read_only attribute
Signed-off-by: NNaphtali Sprei <nsprei@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 07108b29
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册