Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/pmax/stand/lib Include <common.h> to get prototypes...



details:   https://anonhg.NetBSD.org/src/rev/2260abedfc2e
branches:  trunk
changeset: 471784:2260abedfc2e
user:      simonb <simonb%NetBSD.org@localhost>
date:      Sun Apr 11 04:27:30 1999 +0000

description:
Include <common.h> to get prototypes for PROM callbacks.
Use LIBSA_NO_DEV_CLOSE and BOOTRZ instead of SMALL.
In rzclose() call prom_close() on the descriptor if we're on a
    pre-REX machine.

diffstat:

 sys/arch/pmax/stand/lib/rz.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r c50b03d87f99 -r 2260abedfc2e sys/arch/pmax/stand/lib/rz.c
--- a/sys/arch/pmax/stand/lib/rz.c      Sun Apr 11 04:26:31 1999 +0000
+++ b/sys/arch/pmax/stand/lib/rz.c      Sun Apr 11 04:27:30 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rz.c,v 1.12 1999/03/25 05:22:44 simonb Exp $   */
+/*     $NetBSD: rz.c,v 1.13 1999/04/11 04:27:30 simonb Exp $   */
 
 /*
  * Copyright (c) 1992, 1993
@@ -43,6 +43,7 @@
 #include <sys/disklabel.h>
 #include <machine/dec_prom.h>
 #include <machine/stdarg.h>
+#include <common.h>
 #include <rz.h>
 
 struct rz_softc {
@@ -162,7 +163,7 @@
 
        if (part >= lp->d_npartitions || lp->d_partitions[part].p_size == 0) {
        bad:
-#ifndef SMALL
+#ifndef BOOTRZ /* Smaller code for first stage disk bootloader */
                free(sc, sizeof(struct rz_softc));
 #endif
                return (ENXIO);
@@ -170,10 +171,14 @@
        return (0);
 }
 
-#ifndef SMALL
+#ifndef LIBSA_NO_DEV_CLOSE
+int
 rzclose(f)
        struct open_file *f;
 {
+       if (callv == &callvec)
+               prom_close(((struct rz_softc *)f->f_devdata)->sc_fd);
+
        free(f->f_devdata, sizeof(struct rz_softc));
        f->f_devdata = (void *)0;
        return (0);



Home | Main Index | Thread Index | Old Index