Lines Matching full:if
51 * @brief Determine if the data at two memory addresses is equal
60 * bytes are compared and detect if loop was abused and some cycles
63 * @return FIH_SUCCESS if memory regions are equal, otherwise FIH_FAILURE
80 if (s1_p[i] != s2_p[i]) { in boot_fih_memequal()
84 if (i == n) { in boot_fih_memequal()
104 # if MCUBOOT_SWAP_SAVE_ENCTLV in boot_trailer_info_sz()
138 #if MCUBOOT_SWAP_USING_SCRATCH
155 #if MCUBOOT_SWAP_USING_SCRATCH in boot_status_entries()
156 if (flash_area_get_id(fap) == FLASH_AREA_IMAGE_SCRATCH) { in boot_status_entries()
160 if (flash_area_get_id(fap) == FLASH_AREA_IMAGE_PRIMARY(image_index) || in boot_status_entries()
175 #if MCUBOOT_SWAP_USING_SCRATCH in boot_status_off()
176 if (fap->fa_id == FLASH_AREA_IMAGE_SCRATCH) { in boot_status_off()
181 #if MCUBOOT_SWAP_USING_SCRATCH in boot_status_off()
193 #if MCUBOOT_SWAP_SAVE_ENCTLV in boot_enc_key_off()
205 * If the magic is successfully found, a flash_area * is returned and it
214 #if MCUBOOT_SWAP_USING_SCRATCH in boot_find_status()
225 * is assumed that if magic is valid then other metadata is too, in boot_find_status()
232 if (flash_area_open(areas[i], fap)) { in boot_find_status()
236 if (flash_area_read(*fap, boot_magic_off(*fap), magic, BOOT_MAGIC_SZ)) { in boot_find_status()
241 if (BOOT_MAGIC_GOOD == boot_magic_decode(magic)) { in boot_find_status()
248 /* If we got here, no magic was found */ in boot_find_status()
270 #if MCUBOOT_SWAP_SAVE_ENCTLV in boot_read_enc_key()
276 #if MCUBOOT_SWAP_SAVE_ENCTLV in boot_read_enc_key()
278 if (rc == 0) { in boot_read_enc_key()
280 if (bs->enctlv[slot][i] != 0xff) { in boot_read_enc_key()
285 if (i != BOOT_ENC_TLV_ALIGN_SIZE) { in boot_read_enc_key()
321 #if MCUBOOT_SWAP_SAVE_ENCTLV in boot_write_enc_key()
326 if (rc != 0) { in boot_write_enc_key()
336 #if defined(MCUBOOT_SWAP_USING_SCRATCH) || defined(MCUBOOT_SINGLE_APPLICATION_SLOT) || \ in bootutil_max_image_size()
343 if (rc) { in bootutil_max_image_size()
363 #if !defined(MCUBOOT_DIRECT_XIP) && \
377 #if (BOOT_IMAGE_NUMBER == 1) in boot_read_image_size()
383 if (rc != 0) { in boot_read_image_size()
390 if (flash_area_read(fap, off, &info, sizeof(info))) { in boot_read_image_size()
396 if (info.it_magic == IMAGE_TLV_PROT_INFO_MAGIC) { in boot_read_image_size()
397 if (protect_tlv_size != info.it_tlv_tot) { in boot_read_image_size()
402 if (flash_area_read(fap, off + info.it_tlv_tot, &info, sizeof(info))) { in boot_read_image_size()
406 } else if (protect_tlv_size != 0) { in boot_read_image_size()
411 if (info.it_magic != IMAGE_TLV_INFO_MAGIC) { in boot_read_image_size()