Lines Matching full:if

36 #if defined(MCUBOOT_VALIDATE_PRIMARY_SLOT)
43 if (!(x)) { \
51 #if defined(MCUBOOT_ENC_IMAGES)
72 if (sz >= swap_size) { in find_last_idx()
92 #if (BOOT_IMAGE_NUMBER == 1)
96 if (bs == NULL) {
99 if (slot == BOOT_SECONDARY_SLOT &&
104 if (!boot_status_is_reset(bs)) {
108 if (fap == NULL || boot_read_swap_size(fap, &swap_size)) {
121 if (bs->swap_type == BOOT_SWAP_TYPE_REVERT ||
123 if (slot == 0) {
124 if (((bs->idx - BOOT_STATUS_IDX_0) > last_idx ||
133 } else if (slot == 1) {
134 if ((bs->idx - BOOT_STATUS_IDX_0) > last_idx ||
145 if (slot == 0) {
146 if ((bs->idx > BOOT_STATUS_IDX_0 ||
155 } else if (slot == 1) {
156 if (bs->idx > BOOT_STATUS_IDX_0) {
170 if (bs->swap_type == BOOT_SWAP_TYPE_REVERT ||
174 else if (slot == BOOT_SECONDARY_SLOT) {
181 if (rc != 0) {
187 if (rc != 0) {
192 if (check_other_sector == true && out_hdr->ih_magic != IMAGE_MAGIC &&
194 if (boot_swap_type_multi(BOOT_CURR_IMG(state)) != BOOT_SWAP_TYPE_REVERT) {
201 if (rc != 0) {
207 #if defined(MCUBOOT_BOOTSTRAP)
208 if (out_hdr->ih_magic == IMAGE_MAGIC && (bs != NULL || state->bootstrap_secondary_offset_set[
213 if (out_hdr->ih_magic == IMAGE_MAGIC && bs != NULL && slot == BOOT_SECONDARY_SLOT) {
219 if (bs != NULL && out_hdr->ih_magic != IMAGE_MAGIC) {
246 if (max_entries < 0) {
258 if (rc < 0) {
262 if (bootutil_buffer_is_erased(fap, &status, 1)) {
263 if (rc != last_rc) {
267 if (found_idx == -1) {
274 if (erased_sections > 1) {
278 #if !defined(__BOOTSIM__)
282 #if !defined(MCUBOOT_VALIDATE_PRIMARY_SLOT)
290 if (found_idx == -1) {
327 if (sz >= trailer_sz) {
350 if ((num_sectors_pri != num_sectors_sec) &&
358 } else if (num_sectors_pri > BOOT_MAX_IMG_SECTORS) {
363 if ((num_usable_sectors_pri + 1) != num_sectors_sec) {
372 if (sector_sz_pri != sector_sz_sec) {
379 if (sector_sz_pri != MCUBOOT_SLOT0_EXPECTED_ERASE_SIZE) {
385 if (sector_sz_sec != MCUBOOT_SLOT1_EXPECTED_ERASE_SIZE) {
391 #if defined(MCUBOOT_SLOT0_EXPECTED_WRITE_SIZE) || defined(MCUBOOT_SLOT1_EXPECTED_WRITE_SIZE)
392 if (!swap_write_block_size_check(state)) {
398 if (num_sectors_pri > num_sectors_sec) {
399 if (sector_sz_pri != boot_img_sector_size(state, BOOT_PRIMARY_SLOT, i)) {
427 #if (BOOT_IMAGE_NUMBER == 1)
441 if (state_primary_slot.magic == BOOT_MAGIC_GOOD &&
469 if (bs->state == BOOT_STATUS_STATE_0) {
470 if (skip_primary == true) {
489 if (bs->state == BOOT_STATUS_STATE_1) {
490 if (skip_secondary == true) {
522 #if !defined(MCUBOOT_ENC_IMAGES)
530 if (bs->state == BOOT_STATUS_STATE_0) {
531 if (skip_primary == true) {
550 if (bs->state == BOOT_STATUS_STATE_1) {
551 if (skip_secondary == true) {
577 * area in the primary slot must be re-initialized; if during the small
590 #if (BOOT_IMAGE_NUMBER == 1)
595 if (bs->swap_type != BOOT_SWAP_TYPE_REVERT ||
605 if (swap_state.magic == BOOT_MAGIC_UNSET) {
639 if (boot_status_is_reset(bs)) {
646 if (sz >= trailer_sz) {
652 if (last_idx >= first_trailer_idx) {
673 if (bs->idx == BOOT_STATUS_IDX_0) {
676 if (bs->source != BOOT_STATUS_SOURCE_PRIMARY_SLOT) {
699 if (bs->swap_type == BOOT_SWAP_TYPE_REVERT ||
702 if (idx >= (bs->idx - BOOT_STATUS_IDX_0)) {
725 if (idx >= (bs->idx - BOOT_STATUS_IDX_0)) {
768 #if (BOOT_IMAGE_NUMBER == 1)
774 if (rc != 0) {
781 if (slot == BOOT_SECONDARY_SLOT) {
786 if (flash_area_read(fap, (off + secondary_slot_off), &info, sizeof(info))) {
792 if (info.it_magic == IMAGE_TLV_PROT_INFO_MAGIC) {
793 if (protect_tlv_size != info.it_tlv_tot) {
798 if (flash_area_read(fap, (off + secondary_slot_off + info.it_tlv_tot),
803 } else if (protect_tlv_size != 0) {
808 if (info.it_magic != IMAGE_TLV_INFO_MAGIC) {