Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sandpoint/stand/altboot Make sure not to run kernel...



details:   https://anonhg.NetBSD.org/src/rev/a8a5afdaad00
branches:  trunk
changeset: 953885:a8a5afdaad00
user:      rin <rin%NetBSD.org@localhost>
date:      Tue Mar 23 07:21:15 2021 +0000

description:
Make sure not to run kernel if fdloadfile() fails;
it returns *non-zero* value on error.

diffstat:

 sys/arch/sandpoint/stand/altboot/main.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 09375b81beeb -r a8a5afdaad00 sys/arch/sandpoint/stand/altboot/main.c
--- a/sys/arch/sandpoint/stand/altboot/main.c   Tue Mar 23 06:35:24 2021 +0000
+++ b/sys/arch/sandpoint/stand/altboot/main.c   Tue Mar 23 07:21:15 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.31 2019/06/26 22:04:12 christos Exp $ */
+/* $NetBSD: main.c,v 1.32 2021/03/23 07:21:15 rin Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -345,7 +345,7 @@
 
                err = fdloadfile(fd, marks, LOAD_KERNEL);
                close(fd);
-               if (err < 0)
+               if (err != 0)
                        continue;
 
                printf("entry=%p, ssym=%p, esym=%p\n",



Home | Main Index | Thread Index | Old Index