]> git.ipfire.org Git - people/ms/u-boot.git/blob - lib/efi_selftest/efi_selftest_util.c
arm64: dts: sun50i: h5: Order nodes in alphabetic for orangepi-prime
[people/ms/u-boot.git] / lib / efi_selftest / efi_selftest_util.c
1 /*
2 * efi_selftest_util
3 *
4 * Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 *
8 * Utility functions
9 */
10
11 #include <efi_selftest.h>
12
13 int efi_st_memcmp(const void *buf1, const void *buf2, size_t length)
14 {
15 const u8 *pos1 = buf1;
16 const u8 *pos2 = buf2;
17
18 for (; length; --length) {
19 if (*pos1 != *pos2)
20 return *pos1 - *pos2;
21 ++pos1;
22 ++pos2;
23 }
24 return EFI_ST_SUCCESS;
25 }