diff mbox

fwts_log.h: remove LOG_TAG, fix up following bitfields (LP: #1269076)

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

Commit Message

Colin Ian King Jan. 14, 2014, 5:01 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

I forgot to remove the LOG_TAG field when I removed
the --lp-tags and --lp-tags-log options. The downside is that this
breaks the  --log-fields option as this now can't find the tag
bitfield and exits prematurely, so we originally had the following
fields output:

RES,ERR,WRN,DBG,INF,SUM,SEP,NLN,ADV,HED,TAG,PAS,FAL,SKP,ABT,INO

without this fix, we now get the broken result:

RES,ERR,WRN,DBG,INF,SUM,SEP,NLN,ADV,HED

and this patch fixes fwts to produce the correct output:

RES,ERR,WRN,DBG,INF,SUM,SEP,NLN,ADV,HED,PAS,FAL,SKP,ABT,INO

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/include/fwts_log.h | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

Comments

Alex Hung Jan. 16, 2014, 7:51 a.m. UTC | #1
On 01/15/2014 01:01 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> I forgot to remove the LOG_TAG field when I removed
> the --lp-tags and --lp-tags-log options. The downside is that this
> breaks the  --log-fields option as this now can't find the tag
> bitfield and exits prematurely, so we originally had the following
> fields output:
>
> RES,ERR,WRN,DBG,INF,SUM,SEP,NLN,ADV,HED,TAG,PAS,FAL,SKP,ABT,INO
>
> without this fix, we now get the broken result:
>
> RES,ERR,WRN,DBG,INF,SUM,SEP,NLN,ADV,HED
>
> and this patch fixes fwts to produce the correct output:
>
> RES,ERR,WRN,DBG,INF,SUM,SEP,NLN,ADV,HED,PAS,FAL,SKP,ABT,INO
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/lib/include/fwts_log.h | 11 +++++------
>   1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/src/lib/include/fwts_log.h b/src/lib/include/fwts_log.h
> index 3a246fb..f27404d 100644
> --- a/src/lib/include/fwts_log.h
> +++ b/src/lib/include/fwts_log.h
> @@ -39,12 +39,11 @@ typedef enum {
>   	LOG_NEWLINE         = 0x00000080,
>   	LOG_ADVICE          = 0x00000100,
>   	LOG_HEADING	    = 0x00000200,
> -	LOG_TAG		    = 0x00000400,
> -	LOG_PASSED	    = 0x00000800,
> -	LOG_FAILED	    = 0x00001000,
> -	LOG_SKIPPED	    = 0x00002000,
> -	LOG_ABORTED	    = 0x00004000,
> -	LOG_INFOONLY	    = 0x00008000, /* no-op */
> +	LOG_PASSED	    = 0x00000400,
> +	LOG_FAILED	    = 0x00000800,
> +	LOG_SKIPPED	    = 0x00001000,
> +	LOG_ABORTED	    = 0x00002000,
> +	LOG_INFOONLY	    = 0x00004000, /* no-op */
>
>   	LOG_FIELD_MASK	    = 0x0000ffff,
>
>

Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu Jan. 17, 2014, 5:53 a.m. UTC | #2
On 01/15/2014 01:01 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> I forgot to remove the LOG_TAG field when I removed
> the --lp-tags and --lp-tags-log options. The downside is that this
> breaks the  --log-fields option as this now can't find the tag
> bitfield and exits prematurely, so we originally had the following
> fields output:
>
> RES,ERR,WRN,DBG,INF,SUM,SEP,NLN,ADV,HED,TAG,PAS,FAL,SKP,ABT,INO
>
> without this fix, we now get the broken result:
>
> RES,ERR,WRN,DBG,INF,SUM,SEP,NLN,ADV,HED
>
> and this patch fixes fwts to produce the correct output:
>
> RES,ERR,WRN,DBG,INF,SUM,SEP,NLN,ADV,HED,PAS,FAL,SKP,ABT,INO
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/lib/include/fwts_log.h | 11 +++++------
>   1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/src/lib/include/fwts_log.h b/src/lib/include/fwts_log.h
> index 3a246fb..f27404d 100644
> --- a/src/lib/include/fwts_log.h
> +++ b/src/lib/include/fwts_log.h
> @@ -39,12 +39,11 @@ typedef enum {
>   	LOG_NEWLINE         = 0x00000080,
>   	LOG_ADVICE          = 0x00000100,
>   	LOG_HEADING	    = 0x00000200,
> -	LOG_TAG		    = 0x00000400,
> -	LOG_PASSED	    = 0x00000800,
> -	LOG_FAILED	    = 0x00001000,
> -	LOG_SKIPPED	    = 0x00002000,
> -	LOG_ABORTED	    = 0x00004000,
> -	LOG_INFOONLY	    = 0x00008000, /* no-op */
> +	LOG_PASSED	    = 0x00000400,
> +	LOG_FAILED	    = 0x00000800,
> +	LOG_SKIPPED	    = 0x00001000,
> +	LOG_ABORTED	    = 0x00002000,
> +	LOG_INFOONLY	    = 0x00004000, /* no-op */
>
>   	LOG_FIELD_MASK	    = 0x0000ffff,
>
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox

Patch

diff --git a/src/lib/include/fwts_log.h b/src/lib/include/fwts_log.h
index 3a246fb..f27404d 100644
--- a/src/lib/include/fwts_log.h
+++ b/src/lib/include/fwts_log.h
@@ -39,12 +39,11 @@  typedef enum {
 	LOG_NEWLINE         = 0x00000080,
 	LOG_ADVICE          = 0x00000100,
 	LOG_HEADING	    = 0x00000200,
-	LOG_TAG		    = 0x00000400,
-	LOG_PASSED	    = 0x00000800,
-	LOG_FAILED	    = 0x00001000,
-	LOG_SKIPPED	    = 0x00002000,
-	LOG_ABORTED	    = 0x00004000,
-	LOG_INFOONLY	    = 0x00008000, /* no-op */
+	LOG_PASSED	    = 0x00000400,
+	LOG_FAILED	    = 0x00000800,
+	LOG_SKIPPED	    = 0x00001000,
+	LOG_ABORTED	    = 0x00002000,
+	LOG_INFOONLY	    = 0x00004000, /* no-op */
 
 	LOG_FIELD_MASK	    = 0x0000ffff,