ACK: [PATCH] lib: fix build error on non-Intel platforms

Alex Hung alex.hung at canonical.com
Tue Aug 4 02:30:23 UTC 2015


On 07/29/2015 09:55 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> Fix for build error:
>   fwts_dump.c: In function 'fwts_dump_info':
>   fwts_dump.c:259:7: error: unused variable 'root_priv' [-Werror=unused-variable]
>   cc1: all warnings being treated as errors
> 
> Fixes: 6e9c327a42017de ("lib: Allow reading ACPI dump file by non-root user")
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/lib/src/fwts_dump.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/lib/src/fwts_dump.c b/src/lib/src/fwts_dump.c
> index 97c6555..dab4558 100644
> --- a/src/lib/src/fwts_dump.c
> +++ b/src/lib/src/fwts_dump.c
> @@ -256,7 +256,6 @@ static int dump_cpuinfo(void)
>  int fwts_dump_info(fwts_framework *fw)
>  {
>  	char path[PATH_MAX+1];
> -	bool root_priv = (fwts_check_root_euid(fw, false) == FWTS_OK);
>  
>  	if (getcwd(path, PATH_MAX) == NULL)
>  		strcpy(path, "./");
> @@ -277,7 +276,7 @@ int fwts_dump_info(fwts_framework *fw)
>  		printf("Dumping dmesg to dmesg.log\n");
>  
>  #ifdef FWTS_ARCH_INTEL
> -	if (root_priv) {
> +	if (fwts_check_root_euid(fw, false) == FWTS_OK) {
>  		if (dump_dmidecode(fw) != FWTS_OK)
>  			fprintf(stderr, "Failed to dump output from dmidecode.\n");
>  		else
> 

Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list