Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/vax/boot/boot Fake success when trying to use the s...



details:   https://anonhg.NetBSD.org/src/rev/ce48d3a2cd97
branches:  trunk
changeset: 486607:ce48d3a2cd97
user:      ragge <ragge%NetBSD.org@localhost>
date:      Fri May 26 20:18:57 2000 +0000

description:
Fake success when trying to use the strategy() routine on a network device.
This avoids clobbering errno and bad error messages.

diffstat:

 sys/arch/vax/boot/boot/conf.c |  23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diffs (58 lines):

diff -r 4a681de321a3 -r ce48d3a2cd97 sys/arch/vax/boot/boot/conf.c
--- a/sys/arch/vax/boot/boot/conf.c     Fri May 26 20:16:46 2000 +0000
+++ b/sys/arch/vax/boot/boot/conf.c     Fri May 26 20:18:57 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conf.c,v 1.8 2000/05/21 20:17:43 ragge Exp $ */
+/*     $NetBSD: conf.c,v 1.9 2000/05/26 20:18:57 ragge Exp $ */
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -37,6 +37,8 @@
 
 #include "../../include/rpb.h"
 
+#include "lib/libkern/libkern.h"
+
 #include "lib/libsa/stand.h"
 #include "lib/libsa/ufs.h"
 #include "lib/libsa/nfs.h"
@@ -45,9 +47,11 @@
 
 #include "vaxstand.h"
 
+static int nostrategy(void *, int, daddr_t, size_t, void *, size_t *);
+
 struct devsw devsw[]={
        SADEV("hp",hpstrategy, hpopen, nullsys, noioctl),
-       SADEV("qe",nodev, qeopen, qeclose, noioctl), /* DEQNA */
+       SADEV("qe",nostrategy, qeopen, qeclose, noioctl), /* DEQNA */
        SADEV("ctu",ctustrategy, ctuopen, nullsys, noioctl),
        SADEV("ra",rastrategy, raopen, nullsys, noioctl),
        SADEV("mt",rastrategy, raopen, nullsys, noioctl),
@@ -55,10 +59,10 @@
         SADEV("rd",mfmstrategy, mfmopen, nullsys, noioctl),
         SADEV("sd",romstrategy, romopen, nullsys, noioctl),
        SADEV("st",nullsys, nullsys, nullsys, noioctl),
-       SADEV("le",nodev, leopen, leclose, noioctl), /* LANCE */
-        SADEV("ze",nodev, zeopen, zeclose, noioctl), /* SGEC */
+       SADEV("le",nostrategy, leopen, leclose, noioctl), /* LANCE */
+        SADEV("ze",nostrategy, zeopen, zeclose, noioctl), /* SGEC */
        SADEV("rl",romstrategy, romopen, nullsys, noioctl),
-       SADEV("de",nodev, deopen, declose, noioctl), /* DEUNA */
+       SADEV("de",nostrategy, deopen, declose, noioctl), /* DEUNA */
 };
 
 int    cnvtab[] = {
@@ -89,3 +93,12 @@
 };
 
 int nfsys = (sizeof(file_system) / sizeof(struct fs_ops));
+
+int
+nostrategy(void *f, int func, daddr_t dblk,
+    size_t size, void *buf, size_t *rsize)
+{
+       *rsize = size;
+       bzero(buf, size);
+       return 0;
+}



Home | Main Index | Thread Index | Old Index