summaryrefslogtreecommitdiff
path: root/firmware/2lib/include/2common.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/2lib/include/2common.h')
-rw-r--r--firmware/2lib/include/2common.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/2lib/include/2common.h b/firmware/2lib/include/2common.h
index 695f50d1..d43f18a5 100644
--- a/firmware/2lib/include/2common.h
+++ b/firmware/2lib/include/2common.h
@@ -10,6 +10,7 @@
#include "2api.h"
#include "2gbb.h"
+#include "2misc.h"
#include "2packed_key.h"
#include "2return_codes.h"
#include "2sha.h"
@@ -66,7 +67,8 @@ struct vb2_public_key;
#define VB2_REC_OR_DIE(ctx, format, args...) do { \
VB2_DEBUG(format, ## args); \
- if (!(ctx->flags & VB2_CONTEXT_RECOVERY_MODE)) { \
+ if ((vb2_get_sd(ctx)->status & VB2_SD_STATUS_RECOVERY_DECIDED) && \
+ !(ctx->flags & VB2_CONTEXT_RECOVERY_MODE)) { \
vb2ex_abort(); \
for (;;); \
} \