Module Name: src
Committed By: msaitoh
Date: Tue Nov 19 06:19:04 UTC 2019
Modified Files:
src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c
Log Message:
Pull up following revision(s) (requested by martin in ticket #443):
usr.sbin/sysinst/arch/i386/md.c: revision 1.25
usr.sbin/sysinst/arch/i386/md.c: revision 1.26
Fix previous: the install medium may not have /usr/mdec/prekern; it was
meant to copy the one from the just installed system.
Fix previous: not a good idea to try to copy files from the not yet
extracted sets.
To generate a diff of this commit:
cvs rdiff -u -r1.20.2.2 -r1.20.2.3 src/usr.sbin/sysinst/arch/i386/md.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/sysinst/arch/i386/md.c
diff -u src/usr.sbin/sysinst/arch/i386/md.c:1.20.2.2 src/usr.sbin/sysinst/arch/i386/md.c:1.20.2.3
--- src/usr.sbin/sysinst/arch/i386/md.c:1.20.2.2 Sun Nov 17 13:45:26 2019
+++ src/usr.sbin/sysinst/arch/i386/md.c Tue Nov 19 06:19:04 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.20.2.2 2019/11/17 13:45:26 msaitoh Exp $ */
+/* $NetBSD: md.c,v 1.20.2.3 2019/11/19 06:19:04 msaitoh Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -376,13 +376,6 @@ md_post_newfs_uefi(struct install_partit
int
md_post_newfs(struct install_partition_desc *install)
{
-#if defined(__amd64__)
- int ret;
-
- ret = cp_to_target("/usr/mdec/prekern", "/prekern");
- if (ret)
- return ret;
-#endif
return uefi_boot ? md_post_newfs_uefi(install)
: md_post_newfs_bios(install);
@@ -391,6 +384,15 @@ md_post_newfs(struct install_partition_d
int
md_post_extract(struct install_partition_desc *install)
{
+#if defined(__amd64__)
+ if (get_kernel_set() == SET_KERNEL_2) {
+ int ret;
+
+ ret = cp_within_target("/usr/mdec/prekern", "/prekern", 0);
+ if (ret)
+ return ret;
+ }
+#endif
return 0;
}