Lines Matching refs:result
53 int result; in load_mbr_header() local
57 result = io_seek(image_handle, IO_SEEK_SET, MBR_OFFSET); in load_mbr_header()
58 if (result != 0) { in load_mbr_header()
59 WARN("Failed to seek (%i)\n", result); in load_mbr_header()
60 return result; in load_mbr_header()
62 result = io_read(image_handle, (uintptr_t)&mbr_sector, in load_mbr_header()
64 if (result != 0) { in load_mbr_header()
65 WARN("Failed to read data (%i)\n", result); in load_mbr_header()
66 return result; in load_mbr_header()
87 int result; in load_gpt_header() local
90 result = io_seek(image_handle, IO_SEEK_SET, GPT_HEADER_OFFSET); in load_gpt_header()
91 if (result != 0) { in load_gpt_header()
92 return result; in load_gpt_header()
94 result = io_read(image_handle, (uintptr_t)&header, in load_gpt_header()
96 if ((result != 0) || (sizeof(gpt_header_t) != bytes_read)) { in load_gpt_header()
97 return result; in load_gpt_header()
134 int result; in load_mbr_entry() local
138 result = io_seek(image_handle, IO_SEEK_SET, MBR_OFFSET); in load_mbr_entry()
139 if (result != 0) { in load_mbr_entry()
140 WARN("Failed to seek (%i)\n", result); in load_mbr_entry()
141 return result; in load_mbr_entry()
143 result = io_read(image_handle, (uintptr_t)&mbr_sector, in load_mbr_entry()
145 if (result != 0) { in load_mbr_entry()
146 WARN("Failed to read data (%i)\n", result); in load_mbr_entry()
147 return result; in load_mbr_entry()
183 int result; in load_gpt_entry() local
186 result = io_read(image_handle, (uintptr_t)entry, sizeof(gpt_entry_t), in load_gpt_entry()
190 return result; in load_gpt_entry()
196 int result, i; in verify_partition_gpt() local
199 result = load_gpt_entry(image_handle, &entry); in verify_partition_gpt()
200 assert(result == 0); in verify_partition_gpt()
201 result = parse_gpt_entry(&entry, &list.list[i]); in verify_partition_gpt()
202 if (result != 0) { in verify_partition_gpt()
223 int result; in load_partition_table() local
225 result = plat_get_image_source(image_id, &dev_handle, &image_spec); in load_partition_table()
226 if (result != 0) { in load_partition_table()
228 image_id, result); in load_partition_table()
229 return result; in load_partition_table()
232 result = io_open(dev_handle, image_spec, &image_handle); in load_partition_table()
233 if (result != 0) { in load_partition_table()
234 WARN("Failed to access image id=%u (%i)\n", image_id, result); in load_partition_table()
235 return result; in load_partition_table()
238 result = load_mbr_header(image_handle, &mbr_entry); in load_partition_table()
239 if (result != 0) { in load_partition_table()
240 WARN("Failed to access image id=%u (%i)\n", image_id, result); in load_partition_table()
241 return result; in load_partition_table()
244 result = load_gpt_header(image_handle); in load_partition_table()
245 assert(result == 0); in load_partition_table()
246 result = io_seek(image_handle, IO_SEEK_SET, GPT_ENTRY_OFFSET); in load_partition_table()
247 assert(result == 0); in load_partition_table()
248 result = verify_partition_gpt(image_handle); in load_partition_table()
250 result = load_mbr_entries(image_handle); in load_partition_table()
254 return result; in load_partition_table()