From dbb35f2dd342603882e54a666bb0da0d53013b62 Mon Sep 17 00:00:00 2001 From: sos Date: Mon, 24 Nov 2003 14:20:19 +0000 Subject: Be less noisy when GEOM probes around during boot if drive contains invalid media (ie empty CD/DVD) Approved by: re@ --- sys/dev/ata/atapi-cd.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/dev/ata/atapi-cd.c') 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); -- cgit v1.1