diff options
author | Jan Janssen <medhefgo@web.de> | 2022-05-26 09:36:30 +0200 |
---|---|---|
committer | Jan Janssen <medhefgo@web.de> | 2022-05-31 15:09:10 +0200 |
commit | 3d5127c68fc141b735e853667714b692e4150b33 (patch) | |
tree | 79d34f3f8a100fbc461fe7ed7c7b1a32284d8f72 | |
parent | boot: Use strcmp8/16 (diff) | |
download | systemd-3d5127c68fc141b735e853667714b692e4150b33.tar.xz systemd-3d5127c68fc141b735e853667714b692e4150b33.zip |
boot: Use strcmp16 for cpio sorting
-rw-r--r-- | src/boot/efi/boot.c | 4 | ||||
-rw-r--r-- | src/boot/efi/cpio.c | 2 | ||||
-rw-r--r-- | src/boot/efi/util.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index 9a4dda5dd7..68e3e7049c 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -1656,8 +1656,8 @@ static void config_load_entries( } } -static INTN config_entry_compare(const ConfigEntry *a, const ConfigEntry *b) { - INTN r; +static int config_entry_compare(const ConfigEntry *a, const ConfigEntry *b) { + int r; assert(a); assert(b); diff --git a/src/boot/efi/cpio.c b/src/boot/efi/cpio.c index 5de124f113..13da1ca0f8 100644 --- a/src/boot/efi/cpio.c +++ b/src/boot/efi/cpio.c @@ -418,7 +418,7 @@ EFI_STATUS pack_cpio( /* Now, sort the files we found, to make this uniform and stable (and to ensure the TPM measurements * are not dependent on read order) */ - sort_pointer_array((void**) items, n_items, (compare_pointer_func_t) StrCmp); + sort_pointer_array((void**) items, n_items, (compare_pointer_func_t) strcmp16); /* Generate the leading directory inodes right before adding the first files, to the * archive. Otherwise the cpio archive cannot be unpacked, since the leading dirs won't exist. */ diff --git a/src/boot/efi/util.h b/src/boot/efi/util.h index 277ae9bceb..57efd692d1 100644 --- a/src/boot/efi/util.h +++ b/src/boot/efi/util.h @@ -113,7 +113,7 @@ EFI_STATUS log_oom(void); 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); +typedef int (*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, EFI_FILE_INFO **ret, UINTN *ret_size); |