cat: Don't switch terminal mode when there is nothing to highlight.
This just pollutes serial console.
This commit is contained in:
parent
070e190305
commit
8c26dace6f
1 changed files with 7 additions and 4 deletions
|
@ -140,10 +140,13 @@ grub_cmd_cat (grub_extcmd_context_t ctxt, int argc, char **args)
|
||||||
grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
|
grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
|
||||||
}
|
}
|
||||||
|
|
||||||
grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
|
if (utcount)
|
||||||
for (j = 0; j < utcount; j++)
|
{
|
||||||
grub_printf ("<%x>", (unsigned int) utbuf[j]);
|
grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
|
||||||
grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
|
for (j = 0; j < utcount; j++)
|
||||||
|
grub_printf ("<%x>", (unsigned int) utbuf[j]);
|
||||||
|
grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
|
||||||
|
}
|
||||||
|
|
||||||
grub_xputs ("\n");
|
grub_xputs ("\n");
|
||||||
grub_refresh ();
|
grub_refresh ();
|
||||||
|
|
Loading…
Reference in a new issue