cryptsetup: modify keyfile search logic to use read_file_full() too

Let's move the 3rd way how cryptsetup acquires key files to
read_file_full() too.

Since load_key_file()'s raison d'etre now is just the search path logic,
let's rename the function to find_key_file().
This commit is contained in:
Lennart Poettering
2020-12-01 14:27:01 +01:00
parent e2c2f868b2
commit e060ed32e4
3 changed files with 42 additions and 90 deletions
+2 -3
View File
@@ -4,10 +4,9 @@
#include <inttypes.h>
#include <sys/types.h>
int load_key_file(
int find_key_file(
const char *key_file,
char **search_path,
size_t key_file_size,
uint64_t key_file_offset,
const char *bindname,
void **ret_key,
size_t *ret_key_size);