Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bsdinstall/partedit/partedit_x86.c
Context not available. | |||||
/* EFI partition size in bytes */ | /* EFI partition size in bytes */ | ||||
#define EFI_BOOTPART_SIZE (200 * 1024 * 1024) | #define EFI_BOOTPART_SIZE (200 * 1024 * 1024) | ||||
#define EFI_BOOTPART_PATH "/boot/boot1.efifat" | |||||
static const char * | static const char * | ||||
x86_bootmethod(void) | x86_bootmethod(void) | ||||
Context not available. | |||||
bootpart_type(const char *scheme, const char **mountpoint) | bootpart_type(const char *scheme, const char **mountpoint) | ||||
{ | { | ||||
if (strcmp(x86_bootmethod(), "UEFI") == 0) | if (strcmp(x86_bootmethod(), "UEFI") == 0) { | ||||
*mountpoint = "/boot/efi"; | |||||
return ("efi"); | return ("efi"); | ||||
} | |||||
return ("freebsd-boot"); | return ("freebsd-boot"); | ||||
} | } | ||||
Context not available. | |||||
partcode_path(const char *part_type, const char *fs_type) | partcode_path(const char *part_type, const char *fs_type) | ||||
{ | { | ||||
if (strcmp(part_type, "GPT") == 0) { | if (strcmp(part_type, "GPT") == 0 && strcmp(x86_bootmethod(), "UEFI") != 0) { | ||||
if (strcmp(x86_bootmethod(), "UEFI") == 0) | if (strcmp(fs_type, "zfs") == 0) | ||||
return (EFI_BOOTPART_PATH); | |||||
else if (strcmp(fs_type, "zfs") == 0) | |||||
return ("/boot/gptzfsboot"); | return ("/boot/gptzfsboot"); | ||||
else | else | ||||
return ("/boot/gptboot"); | return ("/boot/gptboot"); | ||||
} | } | ||||
/* No partcode except for GPT */ | /* No partcode except for non-UEFI GPT */ | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
Context not available. |