boot: Modify common code access for flash_area objects
The commit changes direct access to flash_area, and flash_structure,
objects via filed names to access via getter functions
Purpose of this change is to make common code agnostic to internal
implementation of flash_area, and flash_sector, objects.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
diff --git a/boot/bootutil/src/swap_priv.h b/boot/bootutil/src/swap_priv.h
index 9cf5777..86d0b72 100644
--- a/boot/bootutil/src/swap_priv.h
+++ b/boot/bootutil/src/swap_priv.h
@@ -95,7 +95,7 @@
static inline size_t boot_scratch_area_size(const struct boot_loader_state *state)
{
- return BOOT_SCRATCH_AREA(state)->fa_size;
+ return flash_area_get_size(BOOT_SCRATCH_AREA(state));
}
#endif