Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ofw fix error checking in ofdisk_open().
details: https://anonhg.NetBSD.org/src/rev/1aab80cc9cac
branches: trunk
changeset: 536525:1aab80cc9cac
user: chs <chs%NetBSD.org@localhost>
date: Wed Sep 18 01:46:40 2002 +0000
description:
fix error checking in ofdisk_open().
remove all vesitages of dk_establish().
diffstat:
sys/dev/ofw/ofdisk.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diffs (46 lines):
diff -r 2bc0c9de7a3d -r 1aab80cc9cac sys/dev/ofw/ofdisk.c
--- a/sys/dev/ofw/ofdisk.c Wed Sep 18 01:46:23 2002 +0000
+++ b/sys/dev/ofw/ofdisk.c Wed Sep 18 01:46:40 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ofdisk.c,v 1.19 2002/09/06 13:18:43 gehenna Exp $ */
+/* $NetBSD: ofdisk.c,v 1.20 2002/09/18 01:46:40 chs Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.19 2002/09/06 13:18:43 gehenna Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.20 2002/09/18 01:46:40 chs Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -137,9 +137,6 @@
of->sc_dk.dk_name = of->sc_name;
strcpy(of->sc_name, of->sc_dev.dv_xname);
disk_attach(&of->sc_dk);
-#ifdef __BROKEN_DK_ESTABLISH
- dk_establish(&of->sc_dk, self); /* XXX */
-#endif
printf("\n");
if (strcmp(child, "floppy") == 0)
@@ -181,7 +178,7 @@
strcat(path, ":0");
- if (!(of->sc_ihandle = OF_open(path)))
+ if ((of->sc_ihandle = OF_open(path)) == -1)
return ENXIO;
/*
@@ -433,7 +430,7 @@
/*
* XXX Firmware bug? Asking for block size gives a
- * XXX rediculous number! So we use what the boot program
+ * XXX ridiculous number! So we use what the boot program
* XXX uses.
*/
lp->d_secsize = DEV_BSIZE;
Home |
Main Index |
Thread Index |
Old Index