Re: [PATCH] cdrom: MO-drive open write fix (trivial)

From: Stefan Meyknecht
Date: Fri Aug 13 2004 - 12:52:35 EST


Jens Axboe <axboe@xxxxxxx> wrote:
> On Fri, Aug 13 2004, Stefan Meyknecht wrote:
> > Jens Axboe <axboe@xxxxxxx> wrote:
> > > Patch looks fine (last hunk is a little code, but that's not
> > > your fault). Thanks!
> >
> > Do you consider including the patch into 2.6.8 or is it too late?
> > Please mail me if something is missing or to resend.
>
> IMHO it's fine for 2.6.8, please resend the patch and CC Linus.


[PATCH] cdrom: MO-drive open write fix

This patch allows mounting MO-drives readwrite.



--- linux/drivers/cdrom/cdrom.c.orig 2004-08-07 14:02:28.958908544 +0200
+++ linux/drivers/cdrom/cdrom.c 2004-08-07 13:58:29.306167698 +0200
@@ -833,8 +833,11 @@ static int cdrom_open_write(struct cdrom
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
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);

--
Stefan Meyknecht
stefan at meyknecht dot org
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/