The FAT filesystem uses f_ as prefix for FAT functions and the VFS core uses f_ as prefix for struct file members. The VFS core also defines f_ prefxed macros to shorten nested member names. Adding f_size in a follow-up commit will thus lead to a clash, so let's work around this by renaming the FAT f_size to f_len. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- fs/fat/fat-pbl.c | 2 +- fs/fat/ff.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fat/fat-pbl.c b/fs/fat/fat-pbl.c index 6b8a807657d4..c50232424066 100644 --- a/fs/fat/fat-pbl.c +++ b/fs/fat/fat-pbl.c @@ -49,5 +49,5 @@ ssize_t pbl_fat_load(struct pbl_bio *bio, const char *filename, void *dest, size return ret; } - return f_size(&file) <= len ? nread : -ENOSPC; + return f_len(&file) <= len ? nread : -ENOSPC; } diff --git a/fs/fat/ff.h b/fs/fat/ff.h index e1a7d029efe8..4a1d670e75ed 100644 --- a/fs/fat/ff.h +++ b/fs/fat/ff.h @@ -190,7 +190,7 @@ TCHAR* f_gets (TCHAR*, int, FIL*); /* Get a string from the file */ #define f_eof(fp) (((fp)->fptr == (fp)->fsize) ? 1 : 0) #define f_error(fp) (((fp)->flag & FA__ERROR) ? 1 : 0) #define f_tell(fp) ((fp)->fptr) -#define f_size(fp) ((fp)->fsize) +#define f_len(fp) ((fp)->fsize) /*--------------------------------------------------------------*/ /* Additional user defined functions */ -- 2.39.5