From 32f827f9ddc7fdb1264e7bea0ed52b3fecc2826d Mon Sep 17 00:00:00 2001 From: mukesh agrawal Date: Tue, 2 Jul 2013 13:00:01 -0700 Subject: [PATCH] crash_collector: pedantically document hashed string for warn_collector When computing a hash of a kernel warning message, we include the trailing newline character. Document this fact, to make it easier to write separate tools that compute the hash. BUG=none TEST=cros_workon_make --board=link --test --reconf crash-reporter Change-Id: I5d78235db5c8bff7e3639c9d1cd3915d343f471e Reviewed-on: https://gerrit.chromium.org/gerrit/60797 Commit-Queue: mukesh agrawal Reviewed-by: mukesh agrawal Tested-by: mukesh agrawal --- crash_reporter/warn_collector.l | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crash_reporter/warn_collector.l b/crash_reporter/warn_collector.l index ee3657e89..6fc2f5638 100644 --- a/crash_reporter/warn_collector.l +++ b/crash_reporter/warn_collector.l @@ -48,7 +48,9 @@ END_TRACE {PREFIX}" ---[ end trace".* ^{CUT_HERE}\n{WARNING} BEGIN(PRE_WARN); .|\n /* ignore all other input in state 0 */ -[^ ]+.[^ ]+\n if (WarnStart()) { /* yytext is file:line func+offset/offset() */ +[^ ]+.[^ ]+\n if (WarnStart()) { + /* yytext is + "file:line func+offset/offset()\n" */ BEGIN(WARN); ECHO; } else { BEGIN(0);