diff options
Diffstat (limited to 'firmware/2lib/include/2common.h')
-rw-r--r-- | firmware/2lib/include/2common.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/firmware/2lib/include/2common.h b/firmware/2lib/include/2common.h index 5470d2a6..135beb96 100644 --- a/firmware/2lib/include/2common.h +++ b/firmware/2lib/include/2common.h @@ -59,6 +59,15 @@ struct vb2_public_key; for (;;); \ } while (0) +#define VB2_REC_OR_DIE(ctx, format, args...) do { \ + VB2_DEBUG(format, ## args); \ + if (!(ctx->flags & VB2_CONTEXT_RECOVERY_MODE)) { \ + vb2ex_abort(); \ + for (;;); \ + } \ + VB2_DEBUG("IGNORING ABORT IN RECOVERY MODE!!!\n"); \ +} while (0) + /* * Define test_mockable and for mocking functions when compiled for Chrome OS * environment (that is, not for firmware). |