Lines Matching refs:magic
72 .magic = {
246 uint8_t magic[BOOT_MAGIC_SZ]; in boot_read_swap_state() local
252 rc = flash_area_read(fap, off, magic, BOOT_MAGIC_SZ); in boot_read_swap_state()
256 if (bootutil_buffer_is_erased(fap, magic, BOOT_MAGIC_SZ)) { in boot_read_swap_state()
257 state->magic = BOOT_MAGIC_UNSET; in boot_read_swap_state()
259 state->magic = boot_magic_decode(magic); in boot_read_swap_state()
308 uint8_t magic[BOOT_MAGIC_ALIGN_SIZE]; in boot_write_magic() local
324 memset(&magic[0], erased_val, sizeof(magic)); in boot_write_magic()
325 memcpy(&magic[BOOT_MAGIC_ALIGN_SIZE - BOOT_MAGIC_SZ], BOOT_IMG_MAGIC, BOOT_MAGIC_SZ); in boot_write_magic()
330 rc = flash_area_write(fap, pad_off, &magic[0], BOOT_MAGIC_ALIGN_SIZE); in boot_write_magic()
444 secondary_slot.magic = BOOT_MAGIC_UNSET; in boot_swap_type_multi()
457 primary_slot.magic) && in boot_swap_type_multi()
459 secondary_slot.magic) && in boot_swap_type_multi()
537 switch (slot_state.magic) { in boot_set_next()
612 switch (slot_state.magic) { in boot_set_next()