From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aapBf-0000Lp-SU for mharc-grub-devel@gnu.org; Tue, 01 Mar 2016 13:38:23 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aapBd-0000LL-1X for grub-devel@gnu.org; Tue, 01 Mar 2016 13:38:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aapBZ-0008HP-Nl for grub-devel@gnu.org; Tue, 01 Mar 2016 13:38:20 -0500 Received: from mx2.suse.de ([195.135.220.15]:46315) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aapBZ-0008H5-HZ for grub-devel@gnu.org; Tue, 01 Mar 2016 13:38:17 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 8148CAD04; Tue, 1 Mar 2016 18:38:15 +0000 (UTC) Subject: Re: [RFC 0/3] Add/use helper functions for finding UEFI config tables To: Leif Lindholm , grub-devel@gnu.org References: <1456854103-12095-1-git-send-email-leif.lindholm@linaro.org> From: Alexander Graf Message-ID: <56D5E197.3020809@suse.de> Date: Tue, 1 Mar 2016 19:38:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1456854103-12095-1-git-send-email-leif.lindholm@linaro.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2016 18:38:21 -0000 On 03/01/2016 06:41 PM, Leif Lindholm wrote: > (Triggered by Alex's recent patches) > > There are a few places in the code manually iterating across the > config tables provided through the UEFI system table. This set > implements a common search function and converts some existing > functions to use it. > > I have not yet converted commands/efi/loadbios.c given that it > searches for multiple things in one go. Would be a trivial change. > > Also, for cleanliness of call-sites a better approach may be to macroize > the function so that it was possible to simply go: > ptr = grub_efi_find_config_table(MY_VERY_SPECIAL_GUID); > This was not my preference, since that hides the fact that the > underlying datatype is a 128-bit struct. Looks reasonable to me. Reviewed-by: Alexander Graf Alex