diff options
| author | H. Peter Anvin <hpa@zytor.com> | 2010-03-09 21:20:55 -0800 |
|---|---|---|
| committer | H. Peter Anvin <hpa@zytor.com> | 2010-03-09 21:22:43 -0800 |
| commit | 9965f4aa56d4fb727deac9e8ee041d4ffd77a97c (patch) | |
| tree | e0087c31eb9d45f0ae2b7b920619f6e3781b8b39 /core | |
| parent | 1974cc50c5aac8ac5369a0361a5ac0c15f6911e2 (diff) | |
| download | syslinux-9965f4aa56d4fb727deac9e8ee041d4ffd77a97c.tar.gz | |
fat: fix the type of get_inode_mode()
get_inode_mode() returns enum dirent_type.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core')
| -rw-r--r-- | 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 97997d54..029c2d4a 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); |
