diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2014-04-27 15:58:07 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2014-04-27 15:58:07 +0000 |
commit | 50efd3e888d76e6b073aea39bdd8124d725d3815 (patch) | |
tree | 06b2673ccb1dbf249f3a6c4d42e55e026c11380a /usr.sbin/bsdinstall/partedit | |
parent | d2748c80915f7c5d0ad7a2e87c8fa664dd5bc862 (diff) | |
download | FreeBSD-src-50efd3e888d76e6b073aea39bdd8124d725d3815.zip FreeBSD-src-50efd3e888d76e6b073aea39bdd8124d725d3815.tar.gz |
Finish connecting up installer UEFI support. If the kernel was booted using
EFI, set up the disks for an EFI system. If booted from BIOS/CSM, set up
for BIOS.
Diffstat (limited to 'usr.sbin/bsdinstall/partedit')
-rw-r--r-- | usr.sbin/bsdinstall/partedit/partedit_x86.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/bsdinstall/partedit/partedit_x86.c b/usr.sbin/bsdinstall/partedit/partedit_x86.c index c9eda5d..156674b 100644 --- a/usr.sbin/bsdinstall/partedit/partedit_x86.c +++ b/usr.sbin/bsdinstall/partedit/partedit_x86.c @@ -32,8 +32,8 @@ #include "partedit.h" -static char platform[255] = "BIOS"; /* XXX once sysctl exists, make this an empty string */ -static const char *platform_sysctl = "hw.platform"; +static char platform[255] = ""; +static const char *platform_sysctl = "machdep.bootmethod"; const char * default_scheme(void) { @@ -82,7 +82,7 @@ bootpart_type(const char *scheme) { if (strlen(platform) == 0) sysctlbyname(platform_sysctl, platform, &platlen, NULL, -1); - if (strcmp(platform, "EFI") == 0) + if (strcmp(platform, "UEFI") == 0) return ("efi"); return ("freebsd-boot"); @@ -93,7 +93,7 @@ bootcode_path(const char *part_type) { size_t platlen = sizeof(platform); if (strlen(platform) == 0) sysctlbyname(platform_sysctl, platform, &platlen, NULL, -1); - if (strcmp(platform, "EFI") == 0) + if (strcmp(platform, "UEFI") == 0) return (NULL); if (strcmp(part_type, "GPT") == 0) @@ -113,7 +113,7 @@ partcode_path(const char *part_type) { sysctlbyname(platform_sysctl, platform, &platlen, NULL, -1); if (strcmp(part_type, "GPT") == 0) { - if (strcmp(platform, "EFI") == 0) + if (strcmp(platform, "UEFI") == 0) return ("/boot/boot1.efifat"); else return ("/boot/gptboot"); |