ACK: [PATCH 02/20] fwts_log_scan: move fwts_klog_free

Colin Ian King colin.king at canonical.com
Thu Jun 21 15:47:56 UTC 2018


On 20/06/18 13:14, Marcello Sylvester Bauer wrote:
> Signed-off-by: Marcello Sylvester Bauer <info at marcellobauer.com>
> ---
>  src/lib/include/fwts_log_scan.h |  2 ++
>  src/lib/src/Makefile.am         |  1 +
>  src/lib/src/fwts_klog.c         |  2 +-
>  src/lib/src/fwts_log_scan.c     | 39 +++++++++++++++++++++++++++++++++++++++
>  4 files changed, 43 insertions(+), 1 deletion(-)
>  create mode 100644 src/lib/src/fwts_log_scan.c
> 
> diff --git a/src/lib/include/fwts_log_scan.h b/src/lib/include/fwts_log_scan.h
> index f1aef712..b410db9b 100644
> --- a/src/lib/include/fwts_log_scan.h
> +++ b/src/lib/include/fwts_log_scan.h
> @@ -38,4 +38,6 @@ typedef struct {
>  	bool compiled_ok;
>  } fwts_log_pattern;
>  
> +void       fwts_log_free(fwts_list *list);
> +
>  #endif
> diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
> index fa232451..382a0abf 100644
> --- a/src/lib/src/Makefile.am
> +++ b/src/lib/src/Makefile.am
> @@ -85,6 +85,7 @@ libfwts_la_SOURCES = 		\
>  	fwts_log_html.c 	\
>  	fwts_log_json.c 	\
>  	fwts_log_plaintext.c 	\
> +	fwts_log_scan.c		\
>  	fwts_log_xml.c 		\
>  	fwts_memorymap.c 	\
>  	fwts_mmap.c 		\
> diff --git a/src/lib/src/fwts_klog.c b/src/lib/src/fwts_klog.c
> index c7fc4cb1..3083fb45 100644
> --- a/src/lib/src/fwts_klog.c
> +++ b/src/lib/src/fwts_klog.c
> @@ -41,7 +41,7 @@
>   */
>  void fwts_klog_free(fwts_list *klog)
>  {
> -	fwts_text_list_free(klog);
> +	fwts_log_free(klog);
>  }
>  
>  /*
> diff --git a/src/lib/src/fwts_log_scan.c b/src/lib/src/fwts_log_scan.c
> new file mode 100644
> index 00000000..7ec81f6b
> --- /dev/null
> +++ b/src/lib/src/fwts_log_scan.c
> @@ -0,0 +1,39 @@
> +/*
> + * Copyright (C) 2010-2018 Canonical
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
> + *
> + */
> +
> +#include <string.h>
> +#include <stdlib.h>
> +#include <stdbool.h>
> +#include <sys/types.h>
> +#include <ctype.h>
> +#include <sys/types.h>
> +#include <sys/stat.h>
> +#include <regex.h>
> +#include <fcntl.h>
> +
> +#include "fwts.h"
> +
> +/*
> + *  fwts_log_free()
> + *  free log list
> + */
> +void fwts_log_free(fwts_list *log)
> +{
> +	fwts_text_list_free(log);
> +}
> 

Acked-by: Colin Ian King <colin.king at canonical.com>



More information about the fwts-devel mailing list