Patchwork utilities: kernelscan.c: Add scanning for ACPI_ERROR

login
register
mail settings
Submitter Colin King
Date Nov. 6, 2012, 12:26 p.m.
Message ID <1352204778-2639-1-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/197476/
State Accepted
Headers show

Comments

Colin King - Nov. 6, 2012, 12:26 p.m.
From: Colin Ian King <colin.king@canonical.com>

Also add scanning for ACPI_ERROR messages.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/utilities/kernelscan.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Keng-Yu Lin - Nov. 8, 2012, 3:05 a.m.
On Tue, Nov 6, 2012 at 1:26 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Also add scanning for ACPI_ERROR messages.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/utilities/kernelscan.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/utilities/kernelscan.c b/src/utilities/kernelscan.c
> index c2d60d9..8a57b82 100644
> --- a/src/utilities/kernelscan.c
> +++ b/src/utilities/kernelscan.c
> @@ -764,7 +764,8 @@ static int parse_kernel_message(parser *p, token *t)
>
>         printk = (strcmp(t->token, "printk") == 0);
>
> -       if (strcmp(t->token, "dev_err") == 0)
> +       if ((strcmp(t->token, "dev_err") == 0) ||
> +           (strcmp(t->token, "ACPI_ERROR") == 0))
>                 emit = true;
>
>         line = strdupcat(line, t->token);
> @@ -855,7 +856,8 @@ static void parse_kernel_messages(FILE *fp)
>
>         while ((get_token(&p, &t)) != EOF) {
>                 if ((strcmp(t.token, "printk") == 0) ||
> -                   (strcmp(t.token, "dev_err") == 0)) {
> +                   (strcmp(t.token, "dev_err") == 0) ||
> +                   (strcmp(t.token, "ACPI_ERROR") == 0)) {
>                         parse_kernel_message(&p, &t);
>                 } else
>                         token_clear(&t);
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Alex Hung - Nov. 21, 2012, 5:53 a.m.
On 11/06/2012 08:26 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Also add scanning for ACPI_ERROR messages.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/utilities/kernelscan.c |    6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/utilities/kernelscan.c b/src/utilities/kernelscan.c
> index c2d60d9..8a57b82 100644
> --- a/src/utilities/kernelscan.c
> +++ b/src/utilities/kernelscan.c
> @@ -764,7 +764,8 @@ static int parse_kernel_message(parser *p, token *t)
>
>   	printk = (strcmp(t->token, "printk") == 0);
>
> -	if (strcmp(t->token, "dev_err") == 0)
> +	if ((strcmp(t->token, "dev_err") == 0) ||
> +	    (strcmp(t->token, "ACPI_ERROR") == 0))
>   		emit = true;
>
>   	line = strdupcat(line, t->token);
> @@ -855,7 +856,8 @@ static void parse_kernel_messages(FILE *fp)
>
>   	while ((get_token(&p, &t)) != EOF) {
>   		if ((strcmp(t.token, "printk") == 0) ||
> -		    (strcmp(t.token, "dev_err") == 0)) {
> +		    (strcmp(t.token, "dev_err") == 0) ||
> +		    (strcmp(t.token, "ACPI_ERROR") == 0)) {
>   			parse_kernel_message(&p, &t);
>   		} else
>   			token_clear(&t);
>
Acked-by: Alex Hung <alex.hung@canonical.com>

Patch

diff --git a/src/utilities/kernelscan.c b/src/utilities/kernelscan.c
index c2d60d9..8a57b82 100644
--- a/src/utilities/kernelscan.c
+++ b/src/utilities/kernelscan.c
@@ -764,7 +764,8 @@  static int parse_kernel_message(parser *p, token *t)
 
 	printk = (strcmp(t->token, "printk") == 0);
 
-	if (strcmp(t->token, "dev_err") == 0)
+	if ((strcmp(t->token, "dev_err") == 0) ||
+	    (strcmp(t->token, "ACPI_ERROR") == 0))
 		emit = true;
 
 	line = strdupcat(line, t->token);
@@ -855,7 +856,8 @@  static void parse_kernel_messages(FILE *fp)
 
 	while ((get_token(&p, &t)) != EOF) {
 		if ((strcmp(t.token, "printk") == 0) ||
-		    (strcmp(t.token, "dev_err") == 0)) {
+		    (strcmp(t.token, "dev_err") == 0) ||
+		    (strcmp(t.token, "ACPI_ERROR") == 0)) {
 			parse_kernel_message(&p, &t);
 		} else
 			token_clear(&t);