cbmem: Escape literal asterisks in log banner regex

I had a stupid. :( Asterisks have a special meaning in regexes, but I
just wanted to match three literal ones. This kills the regex parser.

Change-Id: Ia6149e72715d651c914583ed3235680ce5b7a2e0
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/20171
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
This commit is contained in:
Julius Werner 2017-06-12 17:35:15 -07:00
parent ef08545bff
commit be3aa04f21
1 changed files with 1 additions and 1 deletions

View File

@ -670,7 +670,7 @@ static void dump_console(int one_boot_only)
cursor = 0; cursor = 0;
if (one_boot_only) { if (one_boot_only) {
#define BANNER_REGEX(stage) "\n\ncoreboot-[^\n]* " stage " starting\\.\\.\\.\n" #define BANNER_REGEX(stage) "\n\ncoreboot-[^\n]* " stage " starting\\.\\.\\.\n"
#define OVERFLOW_REGEX(stage) "\n*** Pre-CBMEM " stage " console overflowed" #define OVERFLOW_REGEX(stage) "\n\\*\\*\\* Pre-CBMEM " stage " console overflow"
const char *regex[] = { BANNER_REGEX("bootblock"), const char *regex[] = { BANNER_REGEX("bootblock"),
BANNER_REGEX("romstage"), BANNER_REGEX("romstage"),
OVERFLOW_REGEX("romstage"), OVERFLOW_REGEX("romstage"),