From owner-svn-src-all@FreeBSD.ORG Sun Apr 27 15:58:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2524915; Sun, 27 Apr 2014 15:58:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF1472E5; Sun, 27 Apr 2014 15:58:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3RFw7Lq014246; Sun, 27 Apr 2014 15:58:07 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3RFw71q014245; Sun, 27 Apr 2014 15:58:07 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201404271558.s3RFw71q014245@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 27 Apr 2014 15:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265016 - head/usr.sbin/bsdinstall/partedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2014 15:58:07 -0000 Author: nwhitehorn Date: Sun Apr 27 15:58:07 2014 New Revision: 265016 URL: http://svnweb.freebsd.org/changeset/base/265016 Log: 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. Modified: head/usr.sbin/bsdinstall/partedit/partedit_x86.c Modified: head/usr.sbin/bsdinstall/partedit/partedit_x86.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit_x86.c Sun Apr 27 15:41:44 2014 (r265015) +++ head/usr.sbin/bsdinstall/partedit/partedit_x86.c Sun Apr 27 15:58:07 2014 (r265016) @@ -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");