[PATCH] lib: fwts_klog: forgot to log a klog error using the pattern string

Keng-Yu Lin kengyu at canonical.com
Tue Nov 27 08:07:48 UTC 2012


On Thu, Nov 22, 2012 at 10:41 PM, Colin King <colin.king at canonical.com> wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> It seems that I overlooked actually printing out a klog error using
> the pre-loaded (or pre-converted) label string, which is a bit stupid
> since this makes the majority of the work in the commit
> "lib: klog: load labels from json data file rather than auto-generate"
> a bit pointless.  Anyhow, fix it now.  Klog errors will now report using
> the label from the json data file rather than generating it from the
> pattern string or regex.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/lib/src/fwts_klog.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/lib/src/fwts_klog.c b/src/lib/src/fwts_klog.c
> index c611247..54beae2 100644
> --- a/src/lib/src/fwts_klog.c
> +++ b/src/lib/src/fwts_klog.c
> @@ -253,8 +253,7 @@ void fwts_klog_scan_patterns(fwts_framework *fw,
>                                 fwts_log_info(fw, "Kernel message: %s", line);
>                         else {
>                                 fwts_tag_failed(fw, pattern->tag);
> -                               fwts_failed(fw, pattern->level,
> -                                       fwts_klog_unique_label(pattern->pattern),
> +                               fwts_failed(fw, pattern->level, pattern->label,
>                                         "%s Kernel message: %s", fwts_log_level_to_str(pattern->level), line);
>                                 (*errors)++;
>                         }
> --
> 1.8.0
>
Acked-by: Keng-Yu Lin <kengyu at canonical.com>



More information about the fwts-devel mailing list