From: Pat LaVarre <p.lavarre@ieee.org>
To: axboe@suse.de, patmans@us.ibm.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] until blockdev --setrw /dev/scd$n works
Date: 05 Dec 2003 18:24:41 -0700 [thread overview]
Message-ID: <1070673881.2939.20.camel@patibmrh9> (raw)
I say, as yet, `blockdev --setrw /dev/scd$n` does not work as well as
`blockdev --setrw /dev/hd$v`.
Do you agree?
Do you agree we (e.g. I) should fix that?
Here I show only the very very little I may know so far i.e. Where the
FIXME comments should go, not yet what to substitute for those FIXME
comments.
Pat LaVarre
diff -Nurp linux-2.6.0-test11/drivers/ide/ide-cd.c linux/drivers/ide/ide-cd.c
--- linux-2.6.0-test11/drivers/ide/ide-cd.c 2003-11-26 13:43:50.000000000 -0700
+++ linux/drivers/ide/ide-cd.c 2003-12-05 17:34:01.000000000 -0700
@@ -3211,8 +3211,9 @@ int ide_cdrom_setup (ide_drive_t *drive)
nslots = ide_cdrom_probe_capabilities (drive);
- if (CDROM_CONFIG_FLAGS(drive)->dvd_ram)
- set_disk_ro(drive->disk, 0);
+ set_disk_ro(drive->disk, 0);
+ if (!CDROM_CONFIG_FLAGS(drive)->dvd_ram)
+ printk("lk 2.5 ide-cd.c would refuse write\n");
#if 0
drive->dsc_overlap = (HWIF(drive)->no_dsc) ? 0 : 1;
diff -Nurp linux-2.6.0-test11/drivers/scsi/sr.c linux/drivers/scsi/sr.c
--- linux-2.6.0-test11/drivers/scsi/sr.c 2003-11-26 13:43:25.000000000 -0700
+++ linux/drivers/scsi/sr.c 2003-12-05 17:34:17.000000000 -0700
@@ -328,7 +328,7 @@ static int sr_init_command(struct scsi_c
if (rq_data_dir(SCpnt->request) == WRITE) {
if (!cd->device->writeable)
- return 0;
+ printk("lk 2.5 sr.c would refuse write\n");
SCpnt->cmnd[0] = WRITE_10;
SCpnt->sc_data_direction = SCSI_DATA_WRITE;
} else if (rq_data_dir(SCpnt->request) == READ) {
diff -Nurp linux-2.6.0-test11/drivers/cdrom/cdrom.c linux/drivers/cdrom/cdrom.c
--- linux-2.6.0-test11/drivers/cdrom/cdrom.c 2003-11-26 13:43:07.000000000 -0700
+++ linux/drivers/cdrom/cdrom.c 2003-12-05 17:33:49.000000000 -0700
@@ -427,7 +427,7 @@ int cdrom_open(struct cdrom_device_info
ret = cdi->ops->open(cdi, 1);
else {
if ((fp->f_mode & FMODE_WRITE) && !CDROM_CAN(CDC_DVD_RAM))
- return -EROFS;
+ printk("lk 2.5 cdrom.c would refuse write\n");
ret = open_for_data(cdi);
}
next reply other threads:[~2003-12-06 1:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-06 1:24 Pat LaVarre [this message]
2003-12-06 1:32 ` [PATCH] until blockdev --setrw /dev/scd$n works Pat LaVarre
2003-12-08 17:10 ` Pat LaVarre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1070673881.2939.20.camel@patibmrh9 \
--to=p.lavarre@ieee.org \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=patmans@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox