[U-Boot] [PATCH v2 06/18] efi_selftest: test EFI_DEVICE_PATH_TO_TEXT_PROTOCOL

Simon Glass sjg at chromium.org
Tue Nov 21 04:01:44 UTC 2017


Hi Heinrich,

On 17 November 2017 at 11:28, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> On 11/17/2017 03:06 PM, Simon Glass wrote:
>>
>> On 12 November 2017 at 07:02, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>>>
>>> Provide a test for the EFI_DEVICE_PATH_TO_TEXT_PROTOCOL protocol.
>>>
>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>>> ---
>>> v2
>>>          no change
>>> ---
>>>   lib/efi_selftest/Makefile                  |   3 +
>>>   lib/efi_selftest/efi_selftest_devicepath.c | 340 +++++++++++++++++++++++++++++
>>>   2 files changed, 343 insertions(+)
>>>   create mode 100644 lib/efi_selftest/efi_selftest_devicepath.c
>>
>>
>> Reviewed-by: Simon Glass <sjg at chromium.org>
>>
>> I wish we could just use 0 instead of EFI_SUCCESS
>
>
> 0 does not convey any meaning to me. This is why I tend to use
>
> * NULL instead of 0 and
> * EINVAL instead of 22.
>
> But obviously this is a matter of taste.

Sure, it's no big deal to me. Certainly in drive rmodel I have used 0
for success. To me, EFI_SUCCESS is just UEFI code style bleeding into
U-Boot :-)

>
> Regards
>
> Heinrich
>
>
>>
>> and if (!xx) to check for success.
>>
>> The source code is looking too much like EFI for my liking!
>>
>> Regards,
>> Simon
>>
>

Regards,
Simon


More information about the U-Boot mailing list