diff options
Diffstat (limited to 'fs/fat/fat.c')
| -rw-r--r-- | fs/fat/fat.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 7cf173caaaa..28baa546abe 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -46,7 +46,6 @@ static void downcase (char *str) static block_dev_desc_t *cur_dev = NULL; static unsigned long part_offset = 0; -static unsigned long part_size; static int cur_part = 1; @@ -100,7 +99,6 @@ int fat_register_device (block_dev_desc_t * dev_desc, int part_no) if (!get_partition_info(dev_desc, part_no, &info)) { part_offset = info.start; cur_part = part_no; - part_size = info.size; } else if ((strncmp((char *)&buffer[DOS_FS_TYPE_OFFSET], "FAT", 3) == 0) || (strncmp((char *)&buffer[DOS_FS32_TYPE_OFFSET], "FAT32", 5) == 0)) { /* ok, we assume we are on a PBR only */ @@ -574,8 +572,8 @@ static dir_entry *get_dentfromdir (fsdata *mydata, int startsect, } if ((dentptr->attr & ATTR_VOLUME)) { #ifdef CONFIG_SUPPORT_VFAT - if ((dentptr->attr & ATTR_VFAT) && - (dentptr-> name[0] & LAST_LONG_ENTRY_MASK)) { + if ((dentptr->attr & ATTR_VFAT) == ATTR_VFAT && + (dentptr->name[0] & LAST_LONG_ENTRY_MASK)) { prevcksum = ((dir_slot *)dentptr)->alias_checksum; get_vfatname(mydata, curclust, get_dentfromdir_block, @@ -899,7 +897,7 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize, } if ((dentptr->attr & ATTR_VOLUME)) { #ifdef CONFIG_SUPPORT_VFAT - if ((dentptr->attr & ATTR_VFAT) && + if ((dentptr->attr & ATTR_VFAT) == ATTR_VFAT && (dentptr->name[0] & LAST_LONG_ENTRY_MASK)) { prevcksum = ((dir_slot *)dentptr)->alias_checksum; |
