From d236e825a214a5684598fa7a7b919af332c43390 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sun, 22 Nov 2020 09:19:52 +0100 Subject: fs: fat: export fat_next_cluster() Rename function next_cluster() to fat_next_cluster() and export it. When creating a new directory entries we should reuse deleted entries. This requires re-scanning the directory. Signed-off-by: Heinrich Schuchardt --- include/fat.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/fat.h b/include/fat.h index 02742f92a5..3c29a4484d 100644 --- a/include/fat.h +++ b/include/fat.h @@ -9,8 +9,9 @@ #ifndef _FAT_H_ #define _FAT_H_ -#include #include +#include +#include struct disk_partition; @@ -179,6 +180,9 @@ typedef struct { int fats; /* Number of FATs */ } fsdata; +struct fat_itr; +typedef struct fat_itr fat_itr; + static inline u32 clust_to_sect(fsdata *fsdata, u32 clust) { return fsdata->data_begin + clust * fsdata->clust_size; @@ -208,4 +212,5 @@ void fat_closedir(struct fs_dir_stream *dirs); int fat_unlink(const char *filename); int fat_mkdir(const char *dirname); void fat_close(void); +void *fat_next_cluster(fat_itr *itr, unsigned int *nbytes); #endif /* _FAT_H_ */ -- cgit From b6f11098c9a619f480582b26edd26c5b195c69f4 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 4 Dec 2020 03:33:41 +0100 Subject: efi_loader: move EFI_LOAD_FILE2_PROTOCOL_GUID The EFI_LOAD_FILE_PROTOCOL_GUID and EFI_LOAD_FILE2_PROTOCOL_GUID are needed to complement the implementation of the LoadFile() boot service. Remove a duplicate declaration of a variable for the EFI_LOAD_FILE2_PROTOCOL_GUID. Move the remaining declaration to efi_boottime.c. Add a variable for the EFI_LOAD_FILE_PROTOCOL_GUID. Signed-off-by: Heinrich Schuchardt --- include/efi_loader.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/efi_loader.h b/include/efi_loader.h index 76cd2b36f2..4c6eb8616d 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -195,6 +195,9 @@ extern const efi_guid_t efi_file_system_info_guid; extern const efi_guid_t efi_guid_device_path_utilities_protocol; /* GUID of the deprecated Unicode collation protocol */ extern const efi_guid_t efi_guid_unicode_collation_protocol; +/* GUIDs of the Load File and Load File2 protocol */ +extern const efi_guid_t efi_guid_load_file_protocol; +extern const efi_guid_t efi_guid_load_file2_protocol; /* GUID of the Unicode collation protocol */ extern const efi_guid_t efi_guid_unicode_collation_protocol2; extern const efi_guid_t efi_guid_hii_config_routing_protocol; -- cgit From f9ad240e65ac2f45d7b0acd770b5d79e50c3d92f Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 10 Jan 2020 12:33:59 +0100 Subject: efi_loader: make efi_protocol_open() non-static Provide efi_protocol_open() as library function. Signed-off-by: Heinrich Schuchardt --- include/efi_loader.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/efi_loader.h b/include/efi_loader.h index 4c6eb8616d..365f3d01dc 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -500,6 +500,11 @@ efi_status_t efi_search_protocol(const efi_handle_t handle, efi_status_t efi_add_protocol(const efi_handle_t handle, const efi_guid_t *protocol, void *protocol_interface); +/* Open protocol */ +efi_status_t efi_protocol_open(struct efi_handler *handler, + void **protocol_interface, void *agent_handle, + void *controller_handle, uint32_t attributes); + /* Delete protocol from a handle */ efi_status_t efi_remove_protocol(const efi_handle_t handle, const efi_guid_t *protocol, -- cgit