diff mbox series

[15/20] fwts_clog: add fwts_clog_scan_patterns

Message ID 20180620121446.31470-16-info@marcellobauer.com
State Superseded
Headers show
Series coreboot test intergration | expand

Commit Message

Marcello Sylvester Bauer June 20, 2018, 12:14 p.m. UTC
Signed-off-by: Marcello Sylvester Bauer <info@marcellobauer.com>
---
 src/lib/include/fwts_clog.h |  1 +
 src/lib/src/fwts_clog.c     | 13 +++++++++++++
 2 files changed, 14 insertions(+)

Comments

Colin Ian King June 21, 2018, 3:55 p.m. UTC | #1
On 20/06/18 13:14, Marcello Sylvester Bauer wrote:
> Signed-off-by: Marcello Sylvester Bauer <info@marcellobauer.com>
> ---
>  src/lib/include/fwts_clog.h |  1 +
>  src/lib/src/fwts_clog.c     | 13 +++++++++++++
>  2 files changed, 14 insertions(+)
> 
> diff --git a/src/lib/include/fwts_clog.h b/src/lib/include/fwts_clog.h
> index 4ef58cf1..89cfc350 100644
> --- a/src/lib/include/fwts_clog.h
> +++ b/src/lib/include/fwts_clog.h
> @@ -29,5 +29,6 @@ typedef void (*fwts_clog_scan_func)(fwts_framework *fw, char *line, int repeated
>  void       fwts_clog_free(fwts_list *list);
>  fwts_list *fwts_clog_read(void);
>  int        fwts_clog_scan(fwts_framework *fw, fwts_list *clog, fwts_clog_scan_func callback, fwts_clog_progress_func progress, void *private, int *errors);
> +void       fwts_clog_scan_patterns(fwts_framework *fw, char *line, int repeated, char *prevline, void *private, int *errors);
>  
>  #endif
> diff --git a/src/lib/src/fwts_clog.c b/src/lib/src/fwts_clog.c
> index cc72a4ca..d5babb31 100644
> --- a/src/lib/src/fwts_clog.c
> +++ b/src/lib/src/fwts_clog.c
> @@ -58,3 +58,16 @@ int fwts_clog_scan(fwts_framework *fw,
>  {
>          return fwts_log_scan(fw, clog, scan_func, progress_func, private, match, false);
>  }
> +
> +void fwts_clog_scan_patterns(fwts_framework *fw,
> +        char *line,
> +        int  repeated,
> +        char *prevline,
> +        void *private,
> +        int *errors)
> +{
> +    const char *advice =

make advice static would be useful

> +        "This is a bug picked up by coreboot, but as yet, the "
> +        "firmware test suite has no diagnostic advice for this particular problem.";
> +    fwts_log_scan_patterns(fw, line, repeated, prevline, private, errors, "coreboot", advice);
> +}
>
Alex Hung June 27, 2018, 10:57 p.m. UTC | #2
On 2018-06-21 08:55 AM, Colin Ian King wrote:
> On 20/06/18 13:14, Marcello Sylvester Bauer wrote:
>> Signed-off-by: Marcello Sylvester Bauer <info@marcellobauer.com>
>> ---
>>   src/lib/include/fwts_clog.h |  1 +
>>   src/lib/src/fwts_clog.c     | 13 +++++++++++++
>>   2 files changed, 14 insertions(+)
>>
>> diff --git a/src/lib/include/fwts_clog.h b/src/lib/include/fwts_clog.h
>> index 4ef58cf1..89cfc350 100644
>> --- a/src/lib/include/fwts_clog.h
>> +++ b/src/lib/include/fwts_clog.h
>> @@ -29,5 +29,6 @@ typedef void (*fwts_clog_scan_func)(fwts_framework *fw, char *line, int repeated
>>   void       fwts_clog_free(fwts_list *list);
>>   fwts_list *fwts_clog_read(void);
>>   int        fwts_clog_scan(fwts_framework *fw, fwts_list *clog, fwts_clog_scan_func callback, fwts_clog_progress_func progress, void *private, int *errors);
>> +void       fwts_clog_scan_patterns(fwts_framework *fw, char *line, int repeated, char *prevline, void *private, int *errors);
>>   
>>   #endif
>> diff --git a/src/lib/src/fwts_clog.c b/src/lib/src/fwts_clog.c
>> index cc72a4ca..d5babb31 100644
>> --- a/src/lib/src/fwts_clog.c
>> +++ b/src/lib/src/fwts_clog.c
>> @@ -58,3 +58,16 @@ int fwts_clog_scan(fwts_framework *fw,
>>   {
>>           return fwts_log_scan(fw, clog, scan_func, progress_func, private, match, false);
>>   }
>> +
>> +void fwts_clog_scan_patterns(fwts_framework *fw,
>> +        char *line,
>> +        int  repeated,
>> +        char *prevline,
>> +        void *private,
>> +        int *errors)
>> +{
>> +    const char *advice =
> 
> make advice static would be useful

Please add [V2] to subject line when submitting a revised patch so it is 
easier to track. Thanks
> 
>> +        "This is a bug picked up by coreboot, but as yet, the "
>> +        "firmware test suite has no diagnostic advice for this particular problem.";
>> +    fwts_log_scan_patterns(fw, line, repeated, prevline, private, errors, "coreboot", advice);
>> +}
>>
> 
>
diff mbox series

Patch

diff --git a/src/lib/include/fwts_clog.h b/src/lib/include/fwts_clog.h
index 4ef58cf1..89cfc350 100644
--- a/src/lib/include/fwts_clog.h
+++ b/src/lib/include/fwts_clog.h
@@ -29,5 +29,6 @@  typedef void (*fwts_clog_scan_func)(fwts_framework *fw, char *line, int repeated
 void       fwts_clog_free(fwts_list *list);
 fwts_list *fwts_clog_read(void);
 int        fwts_clog_scan(fwts_framework *fw, fwts_list *clog, fwts_clog_scan_func callback, fwts_clog_progress_func progress, void *private, int *errors);
+void       fwts_clog_scan_patterns(fwts_framework *fw, char *line, int repeated, char *prevline, void *private, int *errors);
 
 #endif
diff --git a/src/lib/src/fwts_clog.c b/src/lib/src/fwts_clog.c
index cc72a4ca..d5babb31 100644
--- a/src/lib/src/fwts_clog.c
+++ b/src/lib/src/fwts_clog.c
@@ -58,3 +58,16 @@  int fwts_clog_scan(fwts_framework *fw,
 {
         return fwts_log_scan(fw, clog, scan_func, progress_func, private, match, false);
 }
+
+void fwts_clog_scan_patterns(fwts_framework *fw,
+        char *line,
+        int  repeated,
+        char *prevline,
+        void *private,
+        int *errors)
+{
+    const char *advice =
+        "This is a bug picked up by coreboot, but as yet, the "
+        "firmware test suite has no diagnostic advice for this particular problem.";
+    fwts_log_scan_patterns(fw, line, repeated, prevline, private, errors, "coreboot", advice);
+}