Date: Wed, 27 Jan 2016 16:36:18 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r294925 - in head/sys/boot: common i386/boot2 i386/gptboot i386/zfsboot mips/beri/boot2 pc98/boot2 Message-ID: <201601271636.u0RGaI90013974@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Wed Jan 27 16:36:18 2016 New Revision: 294925 URL: https://svnweb.freebsd.org/changeset/base/294925 Log: 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 Modified: head/sys/boot/common/paths.h head/sys/boot/i386/boot2/boot2.c head/sys/boot/i386/gptboot/gptboot.c head/sys/boot/i386/zfsboot/zfsboot.c head/sys/boot/mips/beri/boot2/boot2.c head/sys/boot/pc98/boot2/boot2.c Modified: head/sys/boot/common/paths.h ============================================================================== --- head/sys/boot/common/paths.h Wed Jan 27 16:17:15 2016 (r294924) +++ head/sys/boot/common/paths.h Wed Jan 27 16:36:18 2016 (r294925) @@ -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_ */ Modified: head/sys/boot/i386/boot2/boot2.c ============================================================================== --- head/sys/boot/i386/boot2/boot2.c Wed Jan 27 16:17:15 2016 (r294924) +++ head/sys/boot/i386/boot2/boot2.c Wed Jan 27 16:36:18 2016 (r294925) @@ -235,7 +235,7 @@ main(void) */ if (!kname) { - kname = PATH_BOOT3; + kname = PATH_LOADER; if (autoboot && !keyhit(3*SECOND)) { load(); kname = PATH_KERNEL; Modified: head/sys/boot/i386/gptboot/gptboot.c ============================================================================== --- head/sys/boot/i386/gptboot/gptboot.c Wed Jan 27 16:17:15 2016 (r294924) +++ head/sys/boot/i386/gptboot/gptboot.c Wed Jan 27 16:36:18 2016 (r294925) @@ -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(); Modified: head/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- head/sys/boot/i386/zfsboot/zfsboot.c Wed Jan 27 16:17:15 2016 (r294924) +++ head/sys/boot/i386/zfsboot/zfsboot.c Wed Jan 27 16:36:18 2016 (r294925) @@ -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)); Modified: head/sys/boot/mips/beri/boot2/boot2.c ============================================================================== --- head/sys/boot/mips/beri/boot2/boot2.c Wed Jan 27 16:17:15 2016 (r294924) +++ head/sys/boot/mips/beri/boot2/boot2.c Wed Jan 27 16:36:18 2016 (r294925) @@ -248,7 +248,7 @@ main(u_int argc, const char *argv[], con */ if (!kname) { - kname = PATH_BOOT3; + kname = PATH_LOADER; if (autoboot && !keyhit(3*SECOND)) { boot_fromfs(); kname = PATH_KERNEL; Modified: head/sys/boot/pc98/boot2/boot2.c ============================================================================== --- head/sys/boot/pc98/boot2/boot2.c Wed Jan 27 16:17:15 2016 (r294924) +++ head/sys/boot/pc98/boot2/boot2.c Wed Jan 27 16:36:18 2016 (r294925) @@ -374,7 +374,7 @@ main(void) */ if (!kname) { - kname = PATH_BOOT3; + kname = PATH_LOADER; if (autoboot && !keyhit(3*SECOND)) { load(); kname = PATH_KERNEL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601271636.u0RGaI90013974>