![](https://seccdn.libravatar.org/avatar/09fccacd12323f64febfa8adb3f379b7.jpg?s=120&d=mm&r=g)
Peter Osterlund wrote:
Here is a new patch for 2.4.27-rc2:
http://w1.894.telia.com/~u89404340/patches/packet/2.4/packet-2.4.27-rc2.patc...
Thanks Peter. How about the cd-mrw and dvd patches in the 2.4/extra directory.
I've created new patches for 2.4.27-rc2:
http://w1.894.telia.com/~u89404340/patches/packet/2.4/extra/2.4.27-rc2/
However, I couldn't test the mrw patch because my drive firmware doesn't support mrw.
Hello Peter, all: I think the attached incremental patch is needed to avoid the following warning: cdrom.c: In function `cdrom_open_write': cdrom.c:753: warning: implicit declaration of function `cdrom_ram_open_write' cdrom.c: At top level: cdrom.c:830: warning: `cdrom_ram_open_write' was declared implicitly `extern' and later `static' cdrom.c:753: warning: previous declaration of `cdrom_ram_open_write' Regards, Özkan Sezer --- ./drivers/cdrom/cdrom.c.orig 2004-06-28 20:29:49.000000000 +0300 +++ ./drivers/cdrom/cdrom.c 2004-06-28 22:40:53.000000000 +0300 @@ -737,33 +737,6 @@ return ret; } -/* - * returns 0 for ok to open write, non-0 to disallow - */ -static int cdrom_open_write(struct cdrom_device_info *cdi) -{ - int ret = 1; - - if (CDROM_CAN(CDC_MRW_W)) - ret = cdrom_mrw_open_write(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)) - ret = cdrom_ram_open_write(cdi); - - return ret; -} - -static int cdrom_close_write(struct cdrom_device_info *cdi) -{ -#if 0 - return cdrom_flush_cache(cdi); -#else - return 0; -#endif -} - int cdrom_get_random_writable(struct cdrom_device_info *cdi, struct rwrt_feature_desc *rfd) { @@ -843,6 +816,33 @@ return ret; } +/* + * returns 0 for ok to open write, non-0 to disallow + */ +static int cdrom_open_write(struct cdrom_device_info *cdi) +{ + int ret = 1; + + if (CDROM_CAN(CDC_MRW_W)) + ret = cdrom_mrw_open_write(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)) + ret = cdrom_ram_open_write(cdi); + + return ret; +} + +static int cdrom_close_write(struct cdrom_device_info *cdi) +{ +#if 0 + return cdrom_flush_cache(cdi); +#else + return 0; +#endif +} + /* We use the open-option O_NONBLOCK to indicate that the * purpose of opening is only for subsequent ioctl() calls; no device * integrity checks are performed.