Changeset View
Changeset View
Standalone View
Standalone View
efi/libefi/efipart.c
Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | efipart_init(void) | ||||
/* Filter handles to only include FreeBSD partitions. */ | /* Filter handles to only include FreeBSD partitions. */ | ||||
nin = sz / sizeof(EFI_HANDLE); | nin = sz / sizeof(EFI_HANDLE); | ||||
hout = hin + nin; | hout = hin + nin; | ||||
aliases = hout + nin; | aliases = hout + nin; | ||||
nout = 0; | nout = 0; | ||||
bzero(aliases, nin * sizeof(EFI_HANDLE)); | bzero(aliases, nin * sizeof(EFI_HANDLE)); | ||||
pdinfo = malloc(nin * sizeof(*pdinfo)); | pdinfo = malloc(nin * sizeof(struct pdinfo)); | ||||
if (pdinfo == NULL) | if (pdinfo == NULL) | ||||
return (ENOMEM); | return (ENOMEM); | ||||
for (n = 0; n < nin; n++) { | for (n = 0; n < nin; n++) { | ||||
status = BS->HandleProtocol(hin[n], &devpath_guid, | status = BS->HandleProtocol(hin[n], &devpath_guid, | ||||
(void **)&devpath); | (void **)&devpath); | ||||
if (EFI_ERROR(status)) { | if (EFI_ERROR(status)) { | ||||
continue; | continue; | ||||
▲ Show 20 Lines • Show All 249 Lines • Show Last 20 Lines |