diff mbox

utilities: kernelscan: Add check for ACPI_ERROR_METHOD kernel errors

Message ID 1354549057-5084-1-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King Dec. 3, 2012, 3:37 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Also add the ability to search for ACPI_ERROR_METHOD kernel errors

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/utilities/kernelscan.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Keng-Yu Lin Dec. 6, 2012, 7:26 a.m. UTC | #1
On Mon, Dec 3, 2012 at 11:37 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Also add the ability to search for ACPI_ERROR_METHOD kernel errors
>
> 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 5630306..31c8973 100644
> --- a/src/utilities/kernelscan.c
> +++ b/src/utilities/kernelscan.c
> @@ -767,7 +767,8 @@ static int parse_kernel_message(parser *p, token *t)
>         if ((strcmp(t->token, "dev_err") == 0) ||
>             (strcmp(t->token, "ACPI_ERROR") == 0) ||
>             (strcmp(t->token, "ACPI_BIOS_ERROR") == 0) ||
> -           (strcmp(t->token, "ACPI_EXCEPTION") == 0))
> +           (strcmp(t->token, "ACPI_EXCEPTION") == 0) ||
> +           (strcmp(t->token, "ACPI_ERROR_METHOD") == 0))
>                 emit = true;
>
>         line = strdupcat(line, t->token);
> @@ -861,7 +862,8 @@ static void parse_kernel_messages(FILE *fp)
>                     (strcmp(t.token, "dev_err") == 0) ||
>                     (strcmp(t.token, "ACPI_ERROR") == 0) ||
>                     (strcmp(t.token, "ACPI_BIOS_ERROR") == 0) ||
> -                   (strcmp(t.token, "ACPI_EXCEPTION") == 0)) {
> +                   (strcmp(t.token, "ACPI_EXCEPTION") == 0) ||
> +                   (strcmp(t.token, "ACPI_ERROR_METHOD") == 0)) {
>                         parse_kernel_message(&p, &t);
>                 } else
>                         token_clear(&t);
> --
> 1.8.0
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Alex Hung Dec. 12, 2012, 8:04 a.m. UTC | #2
On 12/03/2012 11:37 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Also add the ability to search for ACPI_ERROR_METHOD kernel errors
>
> 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 5630306..31c8973 100644
> --- a/src/utilities/kernelscan.c
> +++ b/src/utilities/kernelscan.c
> @@ -767,7 +767,8 @@ static int parse_kernel_message(parser *p, token *t)
>   	if ((strcmp(t->token, "dev_err") == 0) ||
>   	    (strcmp(t->token, "ACPI_ERROR") == 0) ||
>   	    (strcmp(t->token, "ACPI_BIOS_ERROR") == 0) ||
> -	    (strcmp(t->token, "ACPI_EXCEPTION") == 0))
> +	    (strcmp(t->token, "ACPI_EXCEPTION") == 0) ||
> +	    (strcmp(t->token, "ACPI_ERROR_METHOD") == 0))
>   		emit = true;
>
>   	line = strdupcat(line, t->token);
> @@ -861,7 +862,8 @@ static void parse_kernel_messages(FILE *fp)
>   		    (strcmp(t.token, "dev_err") == 0) ||
>   		    (strcmp(t.token, "ACPI_ERROR") == 0) ||
>   		    (strcmp(t.token, "ACPI_BIOS_ERROR") == 0) ||
> -		    (strcmp(t.token, "ACPI_EXCEPTION") == 0)) {
> +		    (strcmp(t.token, "ACPI_EXCEPTION") == 0) ||
> +		    (strcmp(t.token, "ACPI_ERROR_METHOD") == 0)) {
>   			parse_kernel_message(&p, &t);
>   		} else
>   			token_clear(&t);
>
Acked-by: Alex Hung <alex.hung@canonical.com>
diff mbox

Patch

diff --git a/src/utilities/kernelscan.c b/src/utilities/kernelscan.c
index 5630306..31c8973 100644
--- a/src/utilities/kernelscan.c
+++ b/src/utilities/kernelscan.c
@@ -767,7 +767,8 @@  static int parse_kernel_message(parser *p, token *t)
 	if ((strcmp(t->token, "dev_err") == 0) ||
 	    (strcmp(t->token, "ACPI_ERROR") == 0) ||
 	    (strcmp(t->token, "ACPI_BIOS_ERROR") == 0) ||
-	    (strcmp(t->token, "ACPI_EXCEPTION") == 0))
+	    (strcmp(t->token, "ACPI_EXCEPTION") == 0) ||
+	    (strcmp(t->token, "ACPI_ERROR_METHOD") == 0))
 		emit = true;
 
 	line = strdupcat(line, t->token);
@@ -861,7 +862,8 @@  static void parse_kernel_messages(FILE *fp)
 		    (strcmp(t.token, "dev_err") == 0) ||
 		    (strcmp(t.token, "ACPI_ERROR") == 0) ||
 		    (strcmp(t.token, "ACPI_BIOS_ERROR") == 0) ||
-		    (strcmp(t.token, "ACPI_EXCEPTION") == 0)) {
+		    (strcmp(t.token, "ACPI_EXCEPTION") == 0) ||
+		    (strcmp(t.token, "ACPI_ERROR_METHOD") == 0)) {
 			parse_kernel_message(&p, &t);
 		} else
 			token_clear(&t);