[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 1/4] Make CDROM a read-only drive
From: |
Naphtali Sprei |
Subject: |
[Qemu-devel] [PATCH v2 1/4] Make CDROM a read-only drive |
Date: |
Sun, 17 Jan 2010 16:48:12 +0200 |
Signed-off-by: Naphtali Sprei <address@hidden>
---
vl.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/vl.c b/vl.c
index 06cb40d..76ef8ca 100644
--- a/vl.c
+++ b/vl.c
@@ -2233,6 +2233,13 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque,
}
(void)bdrv_set_read_only(dinfo->bdrv, 1);
}
+ /*
+ * cdrom is read-only. Set it now, after above interface checking
+ * since readonly attribute not explicitly required, so no error.
+ */
+ if (media == MEDIA_CDROM) {
+ (void)bdrv_set_read_only(dinfo->bdrv, 1);
+ }
if (bdrv_open2(dinfo->bdrv, file, bdrv_flags, drv) < 0) {
fprintf(stderr, "qemu: could not open disk image %s: %s\n",
--
1.6.3.3
- [Qemu-devel] [PATCH v2 0/4] Modifications to the drives' readonly attribute, Naphtali Sprei, 2010/01/17
- [Qemu-devel] [PATCH v2 1/4] Make CDROM a read-only drive,
Naphtali Sprei <=
- [Qemu-devel] Re: [PATCH v2 2/4] Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to explicitly request READ-WRITE., Michael S. Tsirkin, 2010/01/17
- Re: [Qemu-devel] Re: [PATCH v2 2/4] Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to explicitly request READ-WRITE., Markus Armbruster, 2010/01/18
- Re: [Qemu-devel] Re: [PATCH v2 2/4] Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to explicitly request READ-WRITE., Michael S. Tsirkin, 2010/01/18
- Re: [Qemu-devel] Re: [PATCH v2 2/4] Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to explicitly request READ-WRITE., Markus Armbruster, 2010/01/18
- Re: [Qemu-devel] Re: [PATCH v2 2/4] Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to explicitly request READ-WRITE., Jamie Lokier, 2010/01/19