Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Meyknecht <sm0407@nurfuerspam.de>2004-08-12 20:57:08 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-12 20:57:08 -0700
commit21b99865eb65496a3d4ed6428e77de3164f8d5b0 (patch)
tree3ccb2a40003ff1ac0d9d999107288b8c2f31b5de
parent064c7c355937f7be5509b1eaf0d77618d61d703d (diff)
[PATCH] cdrom: MO-drive open write fix
This trivial fix allows mounting MO-drives readwrite. Acked by Jens. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/cdrom/cdrom.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 2f778c92b88b..2e1ee63d107f 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -833,8 +833,11 @@ static int cdrom_open_write(struct cdrom_device_info *cdi)
if (!cdrom_is_mrw(cdi, &mrw_write))
mrw = 1;
- (void) cdrom_is_random_writable(cdi, &ram_write);
-
+ if (CDROM_CAN(CDC_MO_DRIVE))
+ ram_write = 1;
+ else
+ (void) cdrom_is_random_writable(cdi, &ram_write);
+
if (mrw)
cdi->mask &= ~CDC_MRW;
else
@@ -855,7 +858,7 @@ static int cdrom_open_write(struct cdrom_device_info *cdi)
else if (CDROM_CAN(CDC_DVD_RAM))
ret = cdrom_dvdram_open_write(cdi);
else if (CDROM_CAN(CDC_RAM) &&
- !CDROM_CAN(CDC_CD_R|CDC_CD_RW|CDC_DVD|CDC_DVD_R|CDC_MRW))
+ !CDROM_CAN(CDC_CD_R|CDC_CD_RW|CDC_DVD|CDC_DVD_R|CDC_MRW|CDC_MO_DRIVE))
ret = cdrom_ram_open_write(cdi);
else if (CDROM_CAN(CDC_MO_DRIVE))
ret = mo_open_write(cdi);