Patchwork utils: kernelscan: also scan for warning messages (LP: #1206953)

login
register
mail settings
Submitter Colin King
Date July 31, 2013, 3:17 p.m.
Message ID <1375283860-18082-1-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/263754/
State Accepted
Headers show

Comments

Colin King - July 31, 2013, 3:17 p.m.
From: Colin Ian King <colin.king@canonical.com>

Add ability to scan also for kernel warning messages.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/utilities/kernelscan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Alex Hung - Aug. 1, 2013, 7:46 a.m.
On 07/31/2013 11:17 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Add ability to scan also for kernel warning messages.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/utilities/kernelscan.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/utilities/kernelscan.c b/src/utilities/kernelscan.c
> index 9acaa4e..04de0f6 100644
> --- a/src/utilities/kernelscan.c
> +++ b/src/utilities/kernelscan.c
> @@ -805,7 +805,8 @@ static int parse_kernel_message(parser *p, token *t)
>   		    (prev_token_type == TOKEN_PAREN_OPENED) &&
>   		    ((strcmp(t->token, "KERN_ERR") == 0) ||
>   		     (strcmp(t->token, "KERN_CRIT") == 0) ||
> -		     (strcmp(t->token, "KERN_EMERG") == 0))) {
> +		     (strcmp(t->token, "KERN_EMERG") == 0) ||
> +		     (strcmp(t->token, "KERN_WARNING") == 0))) {
>   			emit = true;
>   		}
>
>

Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu - Aug. 2, 2013, 3:44 a.m.
On 07/31/2013 11:17 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Add ability to scan also for kernel warning messages.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/utilities/kernelscan.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/utilities/kernelscan.c b/src/utilities/kernelscan.c
> index 9acaa4e..04de0f6 100644
> --- a/src/utilities/kernelscan.c
> +++ b/src/utilities/kernelscan.c
> @@ -805,7 +805,8 @@ static int parse_kernel_message(parser *p, token *t)
>   		    (prev_token_type == TOKEN_PAREN_OPENED) &&
>   		    ((strcmp(t->token, "KERN_ERR") == 0) ||
>   		     (strcmp(t->token, "KERN_CRIT") == 0) ||
> -		     (strcmp(t->token, "KERN_EMERG") == 0))) {
> +		     (strcmp(t->token, "KERN_EMERG") == 0) ||
> +		     (strcmp(t->token, "KERN_WARNING") == 0))) {
>   			emit = true;
>   		}
>
>
Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch

diff --git a/src/utilities/kernelscan.c b/src/utilities/kernelscan.c
index 9acaa4e..04de0f6 100644
--- a/src/utilities/kernelscan.c
+++ b/src/utilities/kernelscan.c
@@ -805,7 +805,8 @@  static int parse_kernel_message(parser *p, token *t)
 		    (prev_token_type == TOKEN_PAREN_OPENED) &&
 		    ((strcmp(t->token, "KERN_ERR") == 0) ||
 		     (strcmp(t->token, "KERN_CRIT") == 0) ||
-		     (strcmp(t->token, "KERN_EMERG") == 0))) {
+		     (strcmp(t->token, "KERN_EMERG") == 0) ||
+		     (strcmp(t->token, "KERN_WARNING") == 0))) {
 			emit = true;
 		}