Lines Matching refs:result

52 	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 VERBOSE("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) || (bytes_read != PLAT_PARTITION_BLOCK_SIZE)) { in load_mbr_header()
65 VERBOSE("Failed to read data (%i)\n", result); in load_mbr_header()
66 return result; in load_mbr_header()
101 int result; in load_gpt_header() local
104 result = io_seek(image_handle, IO_SEEK_SET, header_offset); in load_gpt_header()
105 if (result != 0) { in load_gpt_header()
108 return result; in load_gpt_header()
110 result = io_read(image_handle, (uintptr_t)&header, in load_gpt_header()
112 if ((result != 0) || (sizeof(gpt_header_t) != bytes_read)) { in load_gpt_header()
114 "expected(%zu) and actual(%zu)\n", result, in load_gpt_header()
116 return result; in load_gpt_header()
159 int result; in load_mbr_entry() local
163 result = io_seek(image_handle, IO_SEEK_SET, MBR_OFFSET); in load_mbr_entry()
164 if (result != 0) { in load_mbr_entry()
165 VERBOSE("Failed to seek (%i)\n", result); in load_mbr_entry()
166 return result; in load_mbr_entry()
168 result = io_read(image_handle, (uintptr_t)&mbr_sector, in load_mbr_entry()
170 if (result != 0) { in load_mbr_entry()
171 VERBOSE("Failed to read data (%i)\n", result); in load_mbr_entry()
172 return result; in load_mbr_entry()
215 int result; in load_gpt_entry() local
218 result = io_read(image_handle, (uintptr_t)entry, sizeof(gpt_entry_t), in load_gpt_entry()
220 if ((result != 0) || (sizeof(gpt_entry_t) != bytes_read)) { in load_gpt_entry()
222 "expected(%zu) and actual(%zu)\n", result, in load_gpt_entry()
227 return result; in load_gpt_entry()
239 int result, i; in load_partition_gpt() local
241 result = io_seek(image_handle, IO_SEEK_SET, gpt_entry_offset); in load_partition_gpt()
242 if (result != 0) { in load_partition_gpt()
244 "table entries\n", result); in load_partition_gpt()
245 return result; in load_partition_gpt()
249 result = load_gpt_entry(image_handle, &entry); in load_partition_gpt()
250 if (result != 0) { in load_partition_gpt()
252 i, result); in load_partition_gpt()
253 return result; in load_partition_gpt()
256 result = parse_gpt_entry(&entry, &list.list[i]); in load_partition_gpt()
257 if (result != 0) { in load_partition_gpt()
281 int result; in load_backup_gpt() local
288 result = plat_get_image_source(image_id, &dev_handle, &image_spec); in load_backup_gpt()
289 if (result != 0) { in load_backup_gpt()
291 image_id, result); in load_backup_gpt()
292 return result; in load_backup_gpt()
310 result = io_open(dev_handle, image_spec, &image_handle); in load_backup_gpt()
311 if (result != 0) { in load_backup_gpt()
312 VERBOSE("Failed to access image id (%i)\n", result); in load_backup_gpt()
313 return result; in load_backup_gpt()
319 result = load_gpt_header(image_handle, gpt_header_offset, &part_lba); in load_backup_gpt()
320 if ((result != 0) || (part_lba == 0)) { in load_backup_gpt()
330 result = load_partition_gpt(image_handle, 0); in load_backup_gpt()
334 return result; in load_backup_gpt()
344 int result; in load_primary_gpt() local
350 result = load_gpt_header(image_handle, gpt_header_offset, &part_lba); in load_primary_gpt()
351 if ((result != 0) || (part_lba == 0)) { in load_primary_gpt()
354 return result; in load_primary_gpt()
367 int result; in load_partition_table() local
369 result = plat_get_image_source(image_id, &dev_handle, &image_spec); in load_partition_table()
370 if (result != 0) { in load_partition_table()
372 image_id, result); in load_partition_table()
373 return result; in load_partition_table()
376 result = io_open(dev_handle, image_spec, &image_handle); in load_partition_table()
377 if (result != 0) { in load_partition_table()
378 VERBOSE("Failed to access image id=%u (%i)\n", image_id, result); in load_partition_table()
379 return result; in load_partition_table()
382 result = load_mbr_header(image_handle, &mbr_entry); in load_partition_table()
383 if (result != 0) { in load_partition_table()
384 VERBOSE("Failed to access image id=%u (%i)\n", image_id, result); in load_partition_table()
388 result = load_primary_gpt(image_handle, mbr_entry.first_lba); in load_partition_table()
389 if (result != 0) { in load_partition_table()
395 result = load_mbr_entries(image_handle); in load_partition_table()
400 return result; in load_partition_table()