Changeset View
Changeset View
Standalone View
Standalone View
sys/boot/efi/libefi/handles.c
Context not available. | |||||
EFI_HANDLE alias; | EFI_HANDLE alias; | ||||
struct devsw *dev; | struct devsw *dev; | ||||
int unit; | int unit; | ||||
uint64_t extra; | |||||
}; | }; | ||||
struct entry *entry; | struct entry *entry; | ||||
Context not available. | |||||
return (NULL); | return (NULL); | ||||
} | } | ||||
void | |||||
efi_handle_update_dev(EFI_HANDLE handle, struct devsw *dev, int unit, | |||||
uint64_t guid) | |||||
{ | |||||
int idx; | |||||
for (idx = 0; idx < nentries; idx++) { | |||||
if (entry[idx].handle != handle) | |||||
continue; | |||||
entry[idx].dev = dev; | |||||
entry[idx].unit = unit; | |||||
entry[idx].alias = NULL; | |||||
entry[idx].extra = guid; | |||||
} | |||||
} | |||||
int | int | ||||
efi_handle_lookup(EFI_HANDLE h, struct devsw **dev, int *unit) | efi_handle_lookup(EFI_HANDLE h, struct devsw **dev, int *unit, uint64_t *extra) | ||||
{ | { | ||||
int idx; | int idx; | ||||
Context not available. | |||||
*dev = entry[idx].dev; | *dev = entry[idx].dev; | ||||
if (unit != NULL) | if (unit != NULL) | ||||
*unit = entry[idx].unit; | *unit = entry[idx].unit; | ||||
if (extra != NULL) | |||||
*extra = entry[idx].extra; | |||||
return (0); | return (0); | ||||
} | } | ||||
return (ENOENT); | return (ENOENT); | ||||
Context not available. |