summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atapi-cd.c
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2003-11-24 14:20:19 +0000
committersos <sos@FreeBSD.org>2003-11-24 14:20:19 +0000
commitdbb35f2dd342603882e54a666bb0da0d53013b62 (patch)
treec4f32abcf640c71f136a4f1926f2680ec5bf3b70 /sys/dev/ata/atapi-cd.c
parentbc113c9ce7461e1c12fe00fe2a39790ad5f78379 (diff)
downloadFreeBSD-src-dbb35f2dd342603882e54a666bb0da0d53013b62.zip
FreeBSD-src-dbb35f2dd342603882e54a666bb0da0d53013b62.tar.gz
Be less noisy when GEOM probes around during boot if drive contains
invalid media (ie empty CD/DVD) Approved by: re@
Diffstat (limited to 'sys/dev/ata/atapi-cd.c')
-rw-r--r--sys/dev/ata/atapi-cd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c
index 50da005..1e835b9 100644
--- a/sys/dev/ata/atapi-cd.c
+++ b/sys/dev/ata/atapi-cd.c
@@ -1000,6 +1000,11 @@ acd_geom_start(struct bio *bp)
return;
}
+ if (bp->bio_cmd == BIO_READ && cdp->disk_size == -1) {
+ g_io_deliver(bp, EIO);
+ return;
+ }
+
/* GEOM classes must do their own request limiting */
if (bp->bio_length <= cdp->iomax) {
mtx_lock(&cdp->queue_mtx);
OpenPOWER on IntegriCloud