Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/arch/i386/stand/lib pull up 1.7->1.9 to fix error h...



details:   https://anonhg.NetBSD.org/src/rev/5775682b5f94
branches:  netbsd-1-4
changeset: 468370:5775682b5f94
user:      perry <perry%NetBSD.org@localhost>
date:      Mon Apr 19 15:30:25 1999 +0000

description:
pull up 1.7->1.9 to fix error handling (req. by drochner)

diffstat:

 sys/arch/i386/stand/lib/loadfile.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (35 lines):

diff -r e2434e5d4a07 -r 5775682b5f94 sys/arch/i386/stand/lib/loadfile.c
--- a/sys/arch/i386/stand/lib/loadfile.c        Mon Apr 19 15:19:27 1999 +0000
+++ b/sys/arch/i386/stand/lib/loadfile.c        Mon Apr 19 15:30:25 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: loadfile.c,v 1.7 1999/03/07 20:03:44 he Exp $ */
+/* $NetBSD: loadfile.c,v 1.7.2.1 1999/04/19 15:30:25 perry Exp $ */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
 
        /* Open the file. */
        if ((fd = open(fname, 0)) < 0) {
-               WARN(("open %s", fname));
+               WARN(("open %s", fname ? fname : "<default>"));
                return -1;
        }
 
@@ -162,12 +162,13 @@
        {
                rval = 1;
                errno = EFTYPE;
-               WARN(("%s", fname));
+               WARN(("%s", fname ? fname : "<default>"));
        }
 
-       if (rval == 0)
+       if (rval == 0) {
                PROGRESS(("=0x%lx\n", marks[MARK_END] - marks[MARK_START]));
-       return fd;
+               return fd;
+       }
 err:
        (void)close(fd);
        return -1;



Home | Main Index | Thread Index | Old Index