UPSTREAM: 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.

BUG=chromium:729621

Change-Id: Ia6149e72715d651c914583ed3235680ce5b7a2e0
Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/20171
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/537138
This commit is contained in:
Julius Werner 2017-06-12 17:35:15 -07:00 committed by chrome-bot
parent 3a1de662ac
commit a1d1941d62

View file

@ -670,7 +670,7 @@ static void dump_console(int one_boot_only)
cursor = 0;
if (one_boot_only) {
#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"),
BANNER_REGEX("romstage"),
OVERFLOW_REGEX("romstage"),