summaryrefslogtreecommitdiff
path: root/util/cbmem/cbmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbmem/cbmem.c')
-rw-r--r--util/cbmem/cbmem.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c
index a39ef2ab8e..eef68a0772 100644
--- a/util/cbmem/cbmem.c
+++ b/util/cbmem/cbmem.c
@@ -818,8 +818,8 @@ static void dump_console(enum console_print_type type, int max_loglevel, int pri
cursor = previous = 0;
if (type != CONSOLE_PRINT_FULL) {
#define BANNER_REGEX(stage) \
- "\n\ncoreboot-[^\n]* " stage " starting.*\\.\\.\\.\n"
-#define OVERFLOW_REGEX(stage) "\n\\*\\*\\* Pre-CBMEM " stage " console overflow"
+ "\n\n.?coreboot-[^\n]* " stage " starting.*\\.\\.\\.\n"
+#define OVERFLOW_REGEX(stage) "\n.?\\*\\*\\* Pre-CBMEM " stage " console overflow"
const char *regex[] = { BANNER_REGEX("verstage-before-bootblock"),
BANNER_REGEX("bootblock"),
BANNER_REGEX("verstage"),
@@ -831,7 +831,8 @@ static void dump_console(enum console_print_type type, int max_loglevel, int pri
for (size_t i = 0; !cursor && i < ARRAY_SIZE(regex); i++) {
regex_t re;
regmatch_t match;
- assert(!regcomp(&re, regex[i], 0));
+ int res = regcomp(&re, regex[i], REG_EXTENDED);
+ assert(res == 0);
/* Keep looking for matches so we find the last one. */
while (!regexec(&re, console_c + cursor, 1, &match, 0)) {