Fixed setting of default kernel name when there is no boot.config file.

Didn't fix a more serious problem when boot.config is empty - read()
can't handle empty files.

Reported by:	Chris Timmons <skynyrd@opus.cts.cwu.edu>
This commit is contained in:
Bruce Evans 1997-03-12 18:48:31 +00:00
parent 74cf460b66
commit 051fc6fab1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=23806

View file

@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, [92/04/03 16:51:14 rvb]
* $Id$
* $Id: boot.c,v 1.63 1997/02/22 09:30:06 peter Exp $
*/
@ -154,11 +154,11 @@ boot(int drive)
name = dflt_name;
} else
#endif /*NAMEBLOCK*/
name = "kernel";
readfile("boot.config", boot_config, BOOT_CONFIG_SIZE);
getbootdev(boot_config, &loadflags);
if (namebuf[0] != '\0')
printf("boot.config: %s", boot_config);
name = "kernel";
getbootdev(boot_config, &loadflags);
/*
* XXX parsing of `name' is in openrd(), so the defaults aren't
* updated to match the config (if any) before printing the prompt.