Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/scsipi Pass on indication of absent media in the gen...



details:   https://anonhg.NetBSD.org/src/rev/036c047fcf0f
branches:  trunk
changeset: 537643:036c047fcf0f
user:      soren <soren%NetBSD.org@localhost>
date:      Fri Oct 04 03:43:06 2002 +0000

description:
Pass on indication of absent media in the general case as in the optical
device case.

diffstat:

 sys/dev/scsipi/sd_scsi.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 3c2c0bb57779 -r 036c047fcf0f sys/dev/scsipi/sd_scsi.c
--- a/sys/dev/scsipi/sd_scsi.c  Fri Oct 04 03:41:50 2002 +0000
+++ b/sys/dev/scsipi/sd_scsi.c  Fri Oct 04 03:43:06 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sd_scsi.c,v 1.25 2002/10/02 16:52:54 thorpej Exp $     */
+/*     $NetBSD: sd_scsi.c,v 1.26 2002/10/04 03:43:06 soren Exp $       */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -54,7 +54,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sd_scsi.c,v 1.25 2002/10/02 16:52:54 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sd_scsi.c,v 1.26 2002/10/04 03:43:06 soren Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -320,6 +320,8 @@
         * different. but we have to put SOMETHING here..)
         */
        sectors = scsipi_size(sd->sc_periph, flags);
+       if (sectors == 0)
+               return (SDGP_RESULT_OFFLINE);           /* XXX? */
        dp->blksize = 512;
        dp->disksize = sectors;
        /* Try calling driver's method for figuring out geometry. */



Home | Main Index | Thread Index | Old Index