mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
Fix mistake when transitioning to the new defines with ZFS loader. I
hate adding yet another define, but it is the lessor of the evil choices available. Kill another evil by removing PATH_BOOT3 and replacing it with PATH_LOADER or PATH_LOADER_ZFS as appropriate. PR: 206659
This commit is contained in:
parent
f32e43a6a8
commit
6422ac8292
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=294925
@ -31,9 +31,9 @@
|
||||
|
||||
#define PATH_DOTCONFIG "/boot.config"
|
||||
#define PATH_CONFIG "/boot/config"
|
||||
#define PATH_BOOT3 "/boot/loader"
|
||||
#define PATH_LOADER "/boot/loader"
|
||||
#define PATH_LOADER_EFI "/boot/loader.efi"
|
||||
#define PATH_LOADER_ZFS "/boot/zfsloader"
|
||||
#define PATH_KERNEL "/boot/kernel/kernel"
|
||||
|
||||
#endif /* _PATHS_H_ */
|
||||
|
@ -235,7 +235,7 @@ main(void)
|
||||
*/
|
||||
|
||||
if (!kname) {
|
||||
kname = PATH_BOOT3;
|
||||
kname = PATH_LOADER;
|
||||
if (autoboot && !keyhit(3*SECOND)) {
|
||||
load();
|
||||
kname = PATH_KERNEL;
|
||||
|
@ -178,7 +178,7 @@ main(void)
|
||||
|
||||
if (autoboot && keyhit(3)) {
|
||||
if (*kname == '\0')
|
||||
memcpy(kname, PATH_BOOT3, sizeof(PATH_BOOT3));
|
||||
memcpy(kname, PATH_LOADER, sizeof(PATH_LOADER));
|
||||
break;
|
||||
}
|
||||
autoboot = 0;
|
||||
@ -190,7 +190,7 @@ main(void)
|
||||
*/
|
||||
if (*kname != '\0')
|
||||
load();
|
||||
memcpy(kname, PATH_BOOT3, sizeof(PATH_BOOT3));
|
||||
memcpy(kname, PATH_LOADER, sizeof(PATH_LOADER));
|
||||
load();
|
||||
memcpy(kname, PATH_KERNEL, sizeof(PATH_KERNEL));
|
||||
load();
|
||||
|
@ -546,12 +546,12 @@ main(void)
|
||||
}
|
||||
|
||||
/*
|
||||
* Try to exec stage 3 boot loader. If interrupted by a keypress,
|
||||
* Try to exec /boot/loader. If interrupted by a keypress,
|
||||
* or in case of failure, try to load a kernel directly instead.
|
||||
*/
|
||||
|
||||
if (autoboot && !*kname) {
|
||||
memcpy(kname, PATH_BOOT3, sizeof(PATH_BOOT3));
|
||||
memcpy(kname, PATH_LOADER_ZFS, sizeof(PATH_LOADER_ZFS));
|
||||
if (!keyhit(3)) {
|
||||
load();
|
||||
memcpy(kname, PATH_KERNEL, sizeof(PATH_KERNEL));
|
||||
|
@ -248,7 +248,7 @@ main(u_int argc, const char *argv[], const char *envv[], uint64_t memsize)
|
||||
*/
|
||||
|
||||
if (!kname) {
|
||||
kname = PATH_BOOT3;
|
||||
kname = PATH_LOADER;
|
||||
if (autoboot && !keyhit(3*SECOND)) {
|
||||
boot_fromfs();
|
||||
kname = PATH_KERNEL;
|
||||
|
@ -374,7 +374,7 @@ main(void)
|
||||
*/
|
||||
|
||||
if (!kname) {
|
||||
kname = PATH_BOOT3;
|
||||
kname = PATH_LOADER;
|
||||
if (autoboot && !keyhit(3*SECOND)) {
|
||||
load();
|
||||
kname = PATH_KERNEL;
|
||||
|
Loading…
Reference in New Issue
Block a user