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/boot Clean up prototypes.
details: https://anonhg.NetBSD.org/src/rev/ed048795e1a4
branches: trunk
changeset: 471781:ed048795e1a4
user: simonb <simonb%NetBSD.org@localhost>
date: Sun Apr 11 04:25:47 1999 +0000
description:
Clean up prototypes.
Print a message on failure to load or execute kernel.
diffstat:
sys/arch/pmax/stand/boot/boot.c | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diffs (61 lines):
diff -r 0708b32e535d -r ed048795e1a4 sys/arch/pmax/stand/boot/boot.c
--- a/sys/arch/pmax/stand/boot/boot.c Sun Apr 11 04:25:15 1999 +0000
+++ b/sys/arch/pmax/stand/boot/boot.c Sun Apr 11 04:25:47 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: boot.c,v 1.4 1999/03/31 07:23:27 simonb Exp $ */
+/* $NetBSD: boot.c,v 1.5 1999/04/11 04:25:47 simonb Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -78,18 +78,21 @@
#define PMAX_BOOT_ECOFF
#define PMAX_BOOT_ELF
+#include <stand.h>
#include <sys/param.h>
#include <sys/exec.h>
#include <sys/exec_elf.h>
-#include <stand.h>
#include <machine/dec_prom.h>
+#include <lib/libkern/libkern.h>
+#include "common.h"
#include "bootinfo.h"
-#include "byteswap.h"
#include "loadfile.h"
extern char bootprog_name[], bootprog_rev[], bootprog_date[], bootprog_maker[];
+int main __P((int, char **));
+
/*
* This gets arguments from the PROM, calls other routines to open
* and load the program to boot, and then transfers execution to that
@@ -103,7 +106,7 @@
int argc;
char **argv;
{
- register char *cp;
+ char *cp;
int entry;
u_long marks[MARK_MAX];
struct btinfo_symtab bi_syms;
@@ -127,7 +130,8 @@
marks[MARK_START] = 0;
if (loadfile(cp, marks, LOAD_ALL) == -1)
- return 0;
+ goto fail;
+
entry = marks[MARK_ENTRY];
bi_syms.nsym = marks[MARK_NSYM];
bi_syms.ssym = marks[MARK_SYM];
@@ -141,4 +145,8 @@
else
startprog(entry, entry, argc, argv, DEC_PROM_MAGIC,
callv, BOOTINFO_MAGIC, BOOTINFO_ADDR);
+
+fail:
+ (void)printf("Boot failed! Halting...\n");
+ return (0);
}
Home |
Main Index |
Thread Index |
Old Index