--- a/grub-core/normal/auth.c +++ b/grub-core/normal/auth.c @@ -159,10 +159,13 @@ grub_username_get (char buf[], unsigned buf_size) { unsigned cur_len = 0; int key; + struct grub_term_output *term; + struct grub_term_coordinate coords; while (1) { - key = grub_getkey (); + key = grub_getkey (); + if (key == '\n' || key == '\r') break; @@ -177,7 +180,19 @@ grub_username_get (char buf[], unsigned buf_size) if (cur_len) { cur_len--; - grub_printf ("\b \b"); + FOR_ACTIVE_TERM_OUTPUTS(term) + { + coords=grub_term_getxy (term); + if (coords.x) coords.x--; + else + { + coords.x = grub_term_width (term); + coords.y--; + } + grub_term_gotoxy (term, coords); + grub_puts_terminal (" ", term); + grub_term_gotoxy (term, coords); + } } continue; }