[PATCH v1 15/30] lib/efi: Add new routines to access efi variables

Geoff Levand geoff at infradead.org
Fri Aug 3 03:02:26 AEST 2018


Hi Sam,

On 08/01/2018 10:43 PM, Samuel Mendoza-Jonas wrote:
> On Wed, 2018-08-01 at 16:54 +1000, Samuel Mendoza-Jonas wrote:
>> On Tue, 2018-07-24 at 22:15 +0000, Geoff Levand wrote:

>> The new efivar test isn't added to test/lib/Makefile so it doesn't run.
>> I added it in but it looks like it might have gone a bit stale, eg:
> 
> Looks like just the use of set/get are stale; that and a small fixup to
> efi_get_variable() makes everything green. Does this look sane?


> @@ -148,7 +148,8 @@ int efi_get_variable(void *ctx, const char *guidstr, const char *name,
>  	rc = 0;
>  exit:
>  	talloc_free(path);
> -	close(fd);
> +	if (fd >= 0)
> +		close(fd);

For consistency with the other routines, I think a return if
efi_open() fails would be better.

>  	return rc;
>  }

I made the small change above and folded your changes into
my V2 patches.

Thanks for looking into it.

-Geoff




More information about the Petitboot mailing list