diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-11-22 11:19:52 +0300 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-12-10 11:14:58 +0300 |
commit | d236e825a214a5684598fa7a7b919af332c43390 (patch) | |
tree | b4068142ae945949d73ba0bbdecaf9ea18214300 /include | |
parent | c5924118c03dc8db30d633de98afe6ad6eb7f277 (diff) | |
download | u-boot-d236e825a214a5684598fa7a7b919af332c43390.tar.xz |
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 <xypron.glpk@gmx.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/fat.h | 7 |
1 files changed, 6 insertions, 1 deletions
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 <asm/byteorder.h> #include <fs.h> +#include <asm/byteorder.h> +#include <asm/cache.h> 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_ */ |