Avoid hanging if boot fails on some machines.

This commit is contained in:
ragge 2000-05-26 20:15:21 +00:00
parent e3427d8f2c
commit b8b40eed22
1 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: boot.c,v 1.8 2000/05/25 19:36:20 matt Exp $ */ /* $NetBSD: boot.c,v 1.9 2000/05/26 20:15:21 ragge Exp $ */
/*- /*-
* Copyright (c) 1982, 1986 The Regents of the University of California. * Copyright (c) 1982, 1986 The Regents of the University of California.
* All rights reserved. * All rights reserved.
@ -136,7 +136,8 @@ Xmain(struct rpb *prpb)
/* First try to autoboot */ /* First try to autoboot */
if (askname == 0) { if (askname == 0) {
int fileindex; int fileindex;
for (fileindex = 0; filelist[fileindex].name[0] != '\0'; fileindex++) { for (fileindex = 0; filelist[fileindex].name[0] != '\0';
fileindex++) {
errno = 0; errno = 0;
if (!filelist[fileindex].quiet) if (!filelist[fileindex].quiet)
printf("> boot %s\n", filelist[fileindex].name); printf("> boot %s\n", filelist[fileindex].name);
@ -144,8 +145,10 @@ Xmain(struct rpb *prpb)
if (!filelist[fileindex].quiet) if (!filelist[fileindex].quiet)
printf("%s: boot failed: %s\n", printf("%s: boot failed: %s\n",
filelist[fileindex].name, strerror(errno)); filelist[fileindex].name, strerror(errno));
#if 0 /* Will hang VAX 4000 machines */
if (testkey()) if (testkey())
break; break;
#endif
} }
} }