core: use GRUB_TERM_ definitions when handling term characters

* Also use hex value for GRUB_TERM_ESC as '\e' is not in the C standard and is not understood by some compilers
This commit is contained in:
Pete Batard 2017-08-07 16:20:30 +01:00 committed by Vincent Batts
parent 5f294d3b9e
commit 5ba09fb415
13 changed files with 25 additions and 24 deletions

View file

@ -462,7 +462,7 @@ grub_password_get (char buf[], unsigned buf_size)
if (key == '\n' || key == '\r')
break;
if (key == '\e')
if (key == GRUB_TERM_ESC)
{
cur_len = 0;
break;
@ -487,7 +487,7 @@ grub_password_get (char buf[], unsigned buf_size)
grub_xputs ("\n");
grub_refresh ();
return (key != '\e');
return (key != GRUB_TERM_ESC);
}
#endif