Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/scsipi Don't access (in core) disk label of a remova...
details: https://anonhg.NetBSD.org/src/rev/23c6e60f0ec8
branches: trunk
changeset: 500203:23c6e60f0ec8
user: augustss <augustss%NetBSD.org@localhost>
date: Fri Dec 08 02:30:51 2000 +0000
description:
Don't access (in core) disk label of a removable disk that is not there.
diffstat:
sys/dev/scsipi/sd.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (20 lines):
diff -r 7bc6bb48b356 -r 23c6e60f0ec8 sys/dev/scsipi/sd.c
--- a/sys/dev/scsipi/sd.c Fri Dec 08 02:25:50 2000 +0000
+++ b/sys/dev/scsipi/sd.c Fri Dec 08 02:30:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sd.c,v 1.166 2000/11/24 00:17:35 chs Exp $ */
+/* $NetBSD: sd.c,v 1.167 2000/12/08 02:30:51 augustss Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -822,7 +822,9 @@
* ancient device gets confused by length == 0. A length of 0
* in a 10-byte read/write actually means 0 blocks.
*/
- if (sd->flags & SDF_ANCIENT) {
+ if ((sd->flags & SDF_ANCIENT) &&
+ ((sd->sc_link->flags & (SDEV_REMOVABLE | SDEV_MEDIA_LOADED)) !=
+ SDEV_REMOVABLE)) {
max = sd->sc_dk.dk_label->d_secsize * 0xff;
if (bp->b_bcount > max)
Home |
Main Index |
Thread Index |
Old Index