diff options
-rw-r--r-- | firmware/2lib/2misc.c | 2 | ||||
-rw-r--r-- | firmware/2lib/include/2api.h | 2 | ||||
-rw-r--r-- | tests/vb2_misc_tests.c | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/firmware/2lib/2misc.c b/firmware/2lib/2misc.c index 0878279b..2f68639e 100644 --- a/firmware/2lib/2misc.c +++ b/firmware/2lib/2misc.c @@ -251,7 +251,7 @@ int vb2_check_dev_switch(struct vb2_context *ctx) * Check if we've been asked by the caller to disable dev mode. Note * that hardware switch and GBB flag will take precedence over this. */ - if (ctx->flags & VB2_DISABLE_DEVELOPER_MODE) + if (ctx->flags & VB2_CONTEXT_DISABLE_DEVELOPER_MODE) flags &= ~VB2_SECDATA_FLAG_DEV_MODE; /* Check virtual dev switch */ diff --git a/firmware/2lib/include/2api.h b/firmware/2lib/include/2api.h index 1a75b355..90647d5e 100644 --- a/firmware/2lib/include/2api.h +++ b/firmware/2lib/include/2api.h @@ -111,6 +111,8 @@ enum vb2_context_flags { VB2_CONTEXT_FORCE_WIPEOUT_MODE = (1 << 8), /* Erase TPM developer mode state if it is enabled. */ + VB2_CONTEXT_DISABLE_DEVELOPER_MODE = (1 << 9), + /* Deprecated name; remove */ VB2_DISABLE_DEVELOPER_MODE = (1 << 9), /* diff --git a/tests/vb2_misc_tests.c b/tests/vb2_misc_tests.c index 9089d3da..fddd49df 100644 --- a/tests/vb2_misc_tests.c +++ b/tests/vb2_misc_tests.c @@ -392,7 +392,7 @@ static void dev_switch_tests(void) vb2_secdata_set(&cc, VB2_SECDATA_FLAGS, (VB2_SECDATA_FLAG_DEV_MODE | VB2_SECDATA_FLAG_LAST_BOOT_DEVELOPER)); - cc.flags |= VB2_DISABLE_DEVELOPER_MODE; + cc.flags |= VB2_CONTEXT_DISABLE_DEVELOPER_MODE; TEST_SUCC(vb2_check_dev_switch(&cc), "disable dev on ctx request"); TEST_EQ(sd->flags & VB2_SD_FLAG_DEV_MODE_ENABLED, 0, " sd not in dev"); |