]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - fs/fat/fat.c
fat: correct ATTR_VFAT check
[karo-tx-uboot.git] / fs / fat / fat.c
index 756ac64a8b7b98287788702728134947f22b15ce..28baa546abed47eb772b6f84e74ee7152670c56a 100644 (file)
@@ -572,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,
@@ -897,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;