[PATCH v2 2/7] lib: wrap crypt API to hide errno usage

Steffen Jaeckel jaeckel-floss at eyet-services.de
Mon May 10 19:05:49 CEST 2021


On 5/10/21 6:27 PM, Simon Glass wrote:
> On Mon, 10 May 2021 at 00:19, Steffen Jaeckel
> <jaeckel-floss at eyet-services.de> wrote:
>>
>> In order to prevent using the global errno, replace it with a static
>> version and create a wrapper function which returns the error value.
>>
>> Signed-off-by: Steffen Jaeckel <jaeckel-floss at eyet-services.de>
>> ---
>>
>> (no changes since v1)
>>
>>  include/crypt.h          |  3 ++-
>>  lib/crypt/alg-sha256.h   |  6 ------
>>  lib/crypt/alg-sha512.h   |  6 ------
>>  lib/crypt/crypt-port.h   | 18 ++++++++++--------
>>  lib/crypt/crypt-sha256.c | 26 ++++++++++++++++++++++++--
>>  lib/crypt/crypt-sha512.c | 26 ++++++++++++++++++++++++--
>>  lib/crypt/crypt.c        | 25 ++++++++++++++-----------
>>  test/lib/test_crypt.c    | 24 ++++++++++++++++++++++--
>>  8 files changed, 96 insertions(+), 38 deletions(-)
>>
> 
> Reviewed-by: Simon Glass <sjg at chromium.org>

Thx!

Cheers
Steffen


More information about the U-Boot mailing list