Lines Matching refs:image_handle
46 static int load_mbr_header(uintptr_t image_handle, mbr_entry_t *mbr_entry) in load_mbr_header() argument
54 result = io_seek(image_handle, IO_SEEK_SET, MBR_OFFSET); in load_mbr_header()
59 result = io_read(image_handle, (uintptr_t)&mbr_sector, in load_mbr_header()
80 static int load_gpt_header(uintptr_t image_handle) in load_gpt_header() argument
86 result = io_seek(image_handle, IO_SEEK_SET, GPT_HEADER_OFFSET); in load_gpt_header()
90 result = io_read(image_handle, (uintptr_t)&header, in load_gpt_header()
108 static int load_mbr_entry(uintptr_t image_handle, mbr_entry_t *mbr_entry, in load_mbr_entry() argument
117 result = io_seek(image_handle, IO_SEEK_SET, MBR_OFFSET); in load_mbr_entry()
122 result = io_read(image_handle, (uintptr_t)&mbr_sector, in load_mbr_entry()
142 static int load_mbr_entries(uintptr_t image_handle) in load_mbr_entries() argument
150 load_mbr_entry(image_handle, &mbr_entry, i); in load_mbr_entries()
159 static int load_gpt_entry(uintptr_t image_handle, gpt_entry_t *entry) in load_gpt_entry() argument
165 result = io_read(image_handle, (uintptr_t)entry, sizeof(gpt_entry_t), in load_gpt_entry()
172 static int verify_partition_gpt(uintptr_t image_handle) in verify_partition_gpt() argument
178 result = load_gpt_entry(image_handle, &entry); in verify_partition_gpt()
200 uintptr_t dev_handle, image_handle, image_spec = 0; in load_partition_table() local
211 result = io_open(dev_handle, image_spec, &image_handle); in load_partition_table()
217 result = load_mbr_header(image_handle, &mbr_entry); in load_partition_table()
223 result = load_gpt_header(image_handle); in load_partition_table()
225 result = io_seek(image_handle, IO_SEEK_SET, GPT_ENTRY_OFFSET); in load_partition_table()
227 result = verify_partition_gpt(image_handle); in load_partition_table()
229 result = load_mbr_entries(image_handle); in load_partition_table()
232 io_close(image_handle); in load_partition_table()