Hide partition name

Fixes: #27
This commit is contained in:
Johannes Marbach 2022-01-27 20:25:25 +01:00
parent f3836bf50a
commit 9f74f37d4d
2 changed files with 4 additions and 9 deletions

View file

@ -69,9 +69,8 @@ static void print_usage() {
/*-------------------------------- 78 CHARS --------------------------------*/
"Usage: unl0kr [OPTION]\n"
"\n"
"Unl0kr values the `CRYPTTAB_TRIED` and `CRYPTTAB_SOURCE` environment\n"
"variables. Upon completion, the entered password is printed on STDOUT. All\n"
"other output happens on STDERR.\n"
"Unl0kr values the CRYPTTAB_TRIED variable. Upon completion, the entered\n"
"password is printed to STDOUT. All other output happens on STDERR.\n"
"\n"
"Mandatory arguments to long options are mandatory for short options too.\n"
" -c, --config=PATH Locaton of the main config file. Defaults to\n"

8
main.c
View file

@ -444,18 +444,14 @@ int main(int argc, char *argv[]) {
lv_spangroup_set_mode(spangroup, LV_SPAN_MODE_BREAK);
lv_spangroup_set_overflow(spangroup, LV_SPAN_OVERFLOW_ELLIPSIS);
lv_span_t *span1 = lv_spangroup_new_span(spangroup);
lv_span_t *span2 = lv_spangroup_new_span(spangroup);
lv_span_t *span3 = lv_spangroup_new_span(spangroup);
/* Label text */
const char *crypttab_tried = getenv("CRYPTTAB_TRIED");
if (crypttab_tried && atoi(crypttab_tried) > 0) {
lv_span_set_text(span1, "Password for ");
lv_span_set_text(span3, " incorrect");
lv_span_set_text(span1, "Password incorrect");
} else {
lv_span_set_text(span1, "Password required for ");
lv_span_set_text(span1, "Password required for booting");
}
lv_span_set_text(span2, getenv("CRYPTTAB_SOURCE"));
/* Size label to content */
lv_obj_set_style_max_height(spangroup, LV_PCT(100), LV_PART_MAIN);