summaryrefslogtreecommitdiff
path: root/host/lib/crossystem.c
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/crossystem.c')
-rw-r--r--host/lib/crossystem.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/host/lib/crossystem.c b/host/lib/crossystem.c
index 9d23091f..a2c2104a 100644
--- a/host/lib/crossystem.c
+++ b/host/lib/crossystem.c
@@ -532,6 +532,8 @@ const char *VbGetSystemPropertyString(const char *name, char *dest,
return default_boot[v];
else
return "unknown";
+ } else if (!strcasecmp(name, "minios_priority")) {
+ return vb2_get_nv_storage(VB2_NV_MINIOS_PRIORITY) ? "B" : "A";
}
return NULL;
@@ -671,7 +673,13 @@ int VbSetSystemPropertyString(const char* name, const char* value)
return vb2_set_nv_storage(VB2_NV_TRY_NEXT, 1);
else
return -1;
-
+ } else if (!strcasecmp(name, "minios_priority")) {
+ if (!strcasecmp(value, "A"))
+ return vb2_set_nv_storage(VB2_NV_MINIOS_PRIORITY, 0);
+ else if (!strcasecmp(value, "B"))
+ return vb2_set_nv_storage(VB2_NV_MINIOS_PRIORITY, 1);
+ else
+ return -1;
} else if (!strcasecmp(name, "fw_result")) {
int i;