diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/ux_locales.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/ux_locales.c b/src/lib/ux_locales.c index 0ba66ad8cc..86126195b4 100644 --- a/src/lib/ux_locales.c +++ b/src/lib/ux_locales.c @@ -106,7 +106,7 @@ const char *ux_locales_get_text(const char *name) data = locales_get_map(&size, false); if (!data) { - printk(BIOS_INFO, "%s: %s not found.\n", __func__, + printk(BIOS_ERR, "%s: %s not found.\n", __func__, PRERAM_LOCALES_NAME); return NULL; } @@ -115,7 +115,7 @@ const char *ux_locales_get_text(const char *name) lang_id = vb2api_get_locale_id(vboot_get_context()); /* Validity check: Language ID should smaller than LANG_ID_MAX. */ if (lang_id >= LANG_ID_MAX) { - printk(BIOS_INFO, "%s: ID %d too big; fallback to 0.\n", + printk(BIOS_WARNING, "%s: ID %d too big; fallback to 0.\n", __func__, lang_id); lang_id = 0; } @@ -123,11 +123,10 @@ const char *ux_locales_get_text(const char *name) printk(BIOS_INFO, "%s: Search for %s with language ID: %u\n", __func__, name, lang_id); - offset = 0; /* Search for name. */ - offset = search_for(data, offset, size, name); + offset = search_for(data, 0, size, name); if (offset >= size) { - printk(BIOS_INFO, "%s: Name %s not found.\n", __func__, name); + printk(BIOS_ERR, "%s: Name %s not found.\n", __func__, name); return NULL; } name_offset = offset; @@ -145,20 +144,20 @@ const char *ux_locales_get_text(const char *name) if (lang_id != 0) offset = search_for_id(data, name_offset, size, 0); if (offset >= size) { - printk(BIOS_INFO, "%s: Neither %d nor 0 found.\n", + printk(BIOS_ERR, "%s: Neither %d nor 0 found.\n", __func__, lang_id); return NULL; } } - offset = move_next(data, offset, size); + offset = move_next(data, offset, size); if (offset >= size) return NULL; /* Validity check that the returned string must be NULL terminated. */ next = move_next(data, offset, size) - 1; if (next >= size || data[next] != '\0') { - printk(BIOS_INFO, "%s: %s is not NULL terminated.\n", + printk(BIOS_ERR, "%s: %s is not NULL terminated.\n", __func__, PRERAM_LOCALES_NAME); return NULL; } |