diff mbox series

[14/20] fwts_clog: add fwts_clog_scan

Message ID 20180620121446.31470-15-info@marcellobauer.com
State Accepted
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 |  4 ++++
 src/lib/src/fwts_clog.c     | 10 ++++++++++
 2 files changed, 14 insertions(+)

Comments

Colin Ian King June 21, 2018, 3:54 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 |  4 ++++
>  src/lib/src/fwts_clog.c     | 10 ++++++++++
>  2 files changed, 14 insertions(+)
> 
> diff --git a/src/lib/include/fwts_clog.h b/src/lib/include/fwts_clog.h
> index f29aaa3f..4ef58cf1 100644
> --- a/src/lib/include/fwts_clog.h
> +++ b/src/lib/include/fwts_clog.h
> @@ -23,7 +23,11 @@
>  
>  #include "fwts.h"
>  
> +typedef void (*fwts_clog_progress_func)(fwts_framework *fw, int percent);
> +typedef void (*fwts_clog_scan_func)(fwts_framework *fw, char *line, int repeated, char *prevline, void *private, int *errors);
> +
>  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);
>  
>  #endif
> diff --git a/src/lib/src/fwts_clog.c b/src/lib/src/fwts_clog.c
> index fe04e090..cc72a4ca 100644
> --- a/src/lib/src/fwts_clog.c
> +++ b/src/lib/src/fwts_clog.c
> @@ -48,3 +48,13 @@ fwts_list *fwts_clog_read(void)
>  
>      return list;
>  }
> +
> +int fwts_clog_scan(fwts_framework *fw,
> +        fwts_list *clog,
> +        fwts_clog_scan_func scan_func,
> +        fwts_clog_progress_func progress_func,
> +        void *private,
> +        int *match)
> +{
> +        return fwts_log_scan(fw, clog, scan_func, progress_func, private, match, false);
> +}
> 
Acked-by: Colin Ian King <colin.king@canonical.com>
Alex Hung June 27, 2018, 10:55 p.m. UTC | #2
On 2018-06-20 05:14 AM, Marcello Sylvester Bauer wrote:
> Signed-off-by: Marcello Sylvester Bauer <info@marcellobauer.com>
> ---
>   src/lib/include/fwts_clog.h |  4 ++++
>   src/lib/src/fwts_clog.c     | 10 ++++++++++
>   2 files changed, 14 insertions(+)
> 
> diff --git a/src/lib/include/fwts_clog.h b/src/lib/include/fwts_clog.h
> index f29aaa3f..4ef58cf1 100644
> --- a/src/lib/include/fwts_clog.h
> +++ b/src/lib/include/fwts_clog.h
> @@ -23,7 +23,11 @@
>   
>   #include "fwts.h"
>   
> +typedef void (*fwts_clog_progress_func)(fwts_framework *fw, int percent);
> +typedef void (*fwts_clog_scan_func)(fwts_framework *fw, char *line, int repeated, char *prevline, void *private, int *errors);
> +
>   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);
>   
>   #endif
> diff --git a/src/lib/src/fwts_clog.c b/src/lib/src/fwts_clog.c
> index fe04e090..cc72a4ca 100644
> --- a/src/lib/src/fwts_clog.c
> +++ b/src/lib/src/fwts_clog.c
> @@ -48,3 +48,13 @@ fwts_list *fwts_clog_read(void)
>   
>       return list;
>   }
> +
> +int fwts_clog_scan(fwts_framework *fw,
> +        fwts_list *clog,
> +        fwts_clog_scan_func scan_func,
> +        fwts_clog_progress_func progress_func,
> +        void *private,
> +        int *match)
> +{
> +        return fwts_log_scan(fw, clog, scan_func, progress_func, private, match, false);
> +}
> 

Acked-by: Alex Hung <alex.hung@canonical.com>
diff mbox series

Patch

diff --git a/src/lib/include/fwts_clog.h b/src/lib/include/fwts_clog.h
index f29aaa3f..4ef58cf1 100644
--- a/src/lib/include/fwts_clog.h
+++ b/src/lib/include/fwts_clog.h
@@ -23,7 +23,11 @@ 
 
 #include "fwts.h"
 
+typedef void (*fwts_clog_progress_func)(fwts_framework *fw, int percent);
+typedef void (*fwts_clog_scan_func)(fwts_framework *fw, char *line, int repeated, char *prevline, void *private, int *errors);
+
 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);
 
 #endif
diff --git a/src/lib/src/fwts_clog.c b/src/lib/src/fwts_clog.c
index fe04e090..cc72a4ca 100644
--- a/src/lib/src/fwts_clog.c
+++ b/src/lib/src/fwts_clog.c
@@ -48,3 +48,13 @@  fwts_list *fwts_clog_read(void)
 
     return list;
 }
+
+int fwts_clog_scan(fwts_framework *fw,
+        fwts_list *clog,
+        fwts_clog_scan_func scan_func,
+        fwts_clog_progress_func progress_func,
+        void *private,
+        int *match)
+{
+        return fwts_log_scan(fw, clog, scan_func, progress_func, private, match, false);
+}