[syslinux:pathbased] fat: fix the type of get_inode_mode()
syslinux-bot for H. Peter Anvin
hpa at zytor.com
Tue Mar 9 21:24:06 PST 2010
Commit-ID: 9965f4aa56d4fb727deac9e8ee041d4ffd77a97c
Gitweb: http://syslinux.zytor.com/commit/9965f4aa56d4fb727deac9e8ee041d4ffd77a97c
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Tue, 9 Mar 2010 21:20:55 -0800
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Tue, 9 Mar 2010 21:22:43 -0800
fat: fix the type of get_inode_mode()
get_inode_mode() returns enum dirent_type.
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
---
core/fs/fat/fat.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/core/fs/fat/fat.c b/core/fs/fat/fat.c
index 97997d5..029c2d4 100644
--- a/core/fs/fat/fat.c
+++ b/core/fs/fat/fat.c
@@ -423,12 +423,9 @@ static inline sector_t first_sector(struct fs_info *fs,
return sector;
}
-static inline int get_inode_mode(uint8_t attr)
+static inline enum dirent_type get_inode_mode(uint8_t attr)
{
- if (attr == FAT_ATTR_DIRECTORY)
- return DT_DIR;
- else
- return DT_REG;
+ return (attr & FAT_ATTR_DIRECTORY) ? DT_DIR : DT_REG;
}
@@ -590,7 +587,6 @@ static int vfat_readdir(struct file *file, struct dirent *dirent)
uint8_t vfat_init, vfat_next, vfat_csum;
uint8_t id;
int entries_left;
- int checksum;
bool long_entry = false;
int sec_off = file->offset & ((1 << fs->sector_shift) - 1);
More information about the Syslinux-commits
mailing list