diff options
Diffstat (limited to 'layout.c')
-rw-r--r-- | layout.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -40,6 +40,14 @@ struct flashrom_layout *get_global_layout(void) return &layout; } +const struct flashrom_layout *get_layout(const struct flashrom_flashctx *const flashctx) +{ + if (flashctx->layout && flashctx->layout->num_entries) + return flashctx->layout; + else + return &flashctx->fallback_layout.base; +} + #ifndef __LIBPAYLOAD__ int read_romlayout(const char *name) { |