Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/scsipi In the test for whether to start the unit, I ...
details: https://anonhg.NetBSD.org/src/rev/5e63bd015161
branches: trunk
changeset: 551619:5e63bd015161
user: mycroft <mycroft%NetBSD.org@localhost>
date: Tue Sep 09 02:43:34 2003 +0000
description:
In the test for whether to start the unit, I used the wrong error code.
ENODEV is only returned when we get "medium not present," which we can fail
immediately on. All other "not ready" cases return EIO.
diffstat:
sys/dev/scsipi/cd.c | 8 ++++----
sys/dev/scsipi/sd.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diffs (72 lines):
diff -r d9861ef634ab -r 5e63bd015161 sys/dev/scsipi/cd.c
--- a/sys/dev/scsipi/cd.c Tue Sep 09 02:37:55 2003 +0000
+++ b/sys/dev/scsipi/cd.c Tue Sep 09 02:43:34 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd.c,v 1.193 2003/09/08 23:44:29 mycroft Exp $ */
+/* $NetBSD: cd.c,v 1.194 2003/09/09 02:43:34 mycroft Exp $ */
/*-
* Copyright (c) 1998, 2001, 2003 The NetBSD Foundation, Inc.
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.193 2003/09/08 23:44:29 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.194 2003/09/09 02:43:34 mycroft Exp $");
#include "rnd.h"
@@ -441,7 +441,7 @@
* raw parition to be opened, for raw IOCTLs. Data transfers
* will check for SDEV_MEDIA_LOADED.
*/
- if (error == ENODEV) {
+ if (error == EIO) {
int silent, error2;
if (part == RAW_PART && fmt == S_IFCHR)
@@ -453,7 +453,7 @@
case 0:
error = 0;
break;
- case ENODEV:
+ case EIO:
case EINVAL:
if (silent)
goto out;
diff -r d9861ef634ab -r 5e63bd015161 sys/dev/scsipi/sd.c
--- a/sys/dev/scsipi/sd.c Tue Sep 09 02:37:55 2003 +0000
+++ b/sys/dev/scsipi/sd.c Tue Sep 09 02:43:34 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sd.c,v 1.205 2003/09/08 23:43:35 mycroft Exp $ */
+/* $NetBSD: sd.c,v 1.206 2003/09/09 02:43:35 mycroft Exp $ */
/*-
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.205 2003/09/08 23:43:35 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.206 2003/09/09 02:43:35 mycroft Exp $");
#include "opt_scsi.h"
#include "opt_bufq.h"
@@ -421,7 +421,7 @@
* raw parition to be opened, for raw IOCTLs. Data transfers
* will check for SDEV_MEDIA_LOADED.
*/
- if (error == ENODEV) {
+ if (error == EIO) {
int silent, error2;
if (part == RAW_PART && fmt == S_IFCHR)
@@ -433,7 +433,7 @@
case 0:
error = 0;
break;
- case ENODEV:
+ case EIO:
case EINVAL:
if (silent)
goto out;
Home |
Main Index |
Thread Index |
Old Index