ACK: [PATCH] lib: fwts_log: make magic uint64_t to improve corruption checking

ivanhu ivan.hu at canonical.com
Thu Sep 21 07:59:42 UTC 2017



On 09/06/2017 05:34 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> Make the magic field 64 bits to ensure we have more magic bits to check
> on for structure corruption checking.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/lib/include/fwts_log.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/lib/include/fwts_log.h b/src/lib/include/fwts_log.h
> index 028ba36c..da8cb42b 100644
> --- a/src/lib/include/fwts_log.h
> +++ b/src/lib/include/fwts_log.h
> @@ -26,7 +26,7 @@
>   #include "fwts_framework.h"
>   #include "fwts_list.h"
>   
> -#define LOG_MAGIC		(0xfe23ab13)
> +#define LOG_MAGIC		(0xfe23ab13cb1ef754ULL)
>   #define LOG_MAX_BUF_SIZE	(4096)		/* Max output per log line */
>   
>   typedef enum {
> @@ -87,7 +87,7 @@ typedef enum {
>    *  top level log descriptor
>    */
>   typedef struct log_t {
> -	unsigned int magic;			/* magic ID of the log */
> +	uint64_t magic;				/* magic ID of the log */
>   	fwts_list log_files;			/* list of fwts_log_file */
>   	char *owner;				/* who is writing to this log */
>   } fwts_log;
> 

Acked-by: Ivan Hu <ivan.hu at canonical.com>



More information about the fwts-devel mailing list