summaryrefslogtreecommitdiffstats
path: root/src/boot/efi/util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-09-20 14:07:42 +0200
committerLennart Poettering <lennart@poettering.net>2021-09-23 17:23:45 +0200
commit80b2f4d92ce4d7a52cbfb9b5efdcff96366fc37a (patch)
tree0454c5bbdcb7780b36da0d1733c732adf2862fef /src/boot/efi/util.h
parentboot: add a bunch of new helper calls (diff)
downloadsystemd-80b2f4d92ce4d7a52cbfb9b5efdcff96366fc37a.tar.xz
systemd-80b2f4d92ce4d7a52cbfb9b5efdcff96366fc37a.zip
boot: generalize sorting code
Let's make this generic, so that we can reuse it elsewhere later.
Diffstat (limited to '')
-rw-r--r--src/boot/efi/util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/boot/efi/util.h b/src/boot/efi/util.h
index 45e6b940cb..ea32a76166 100644
--- a/src/boot/efi/util.h
+++ b/src/boot/efi/util.h
@@ -98,6 +98,9 @@ static inline VOID *mempmem_safe(const VOID *haystack, UINTN haystack_len, const
VOID print_at(UINTN x, UINTN y, UINTN attr, const CHAR16 *str);
VOID clear_screen(UINTN attr);
+typedef INTN (*compare_pointer_func_t)(const VOID *a, const VOID *b);
+void sort_pointer_array(VOID **array, UINTN n_members, compare_pointer_func_t compare);
+
EFI_STATUS get_file_info_harder(EFI_FILE_HANDLE handle, EFI_FILE_INFO **ret, UINTN *ret_size);
EFI_STATUS readdir_harder(EFI_FILE_HANDLE handle, EFI_FILE_INFO **buffer, UINTN *buffer_size);