Changeset b6913b7 in mainline for uspace/srv/fs/fat/fat_directory.c


Ignore:
Timestamp:
2012-04-07T17:42:36Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1d7b4b
Parents:
db96017
Message:

When a FAT filesystem is mounted with the 'nolfn' mount option, besides
writing new dentries in the 8.3 format, also read dentries only in the
8.3 format. Note that some other aspects (such as complete cleanup of
the LFN dentries on SFN erase) of LFN are still active even with
'nolfn'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat_directory.c

    rdb96017 rb6913b7  
    162162        int rc;
    163163
     164        void *data;
     165        fat_instance_t *instance;
     166
     167        rc = fs_instance_get(di->nodep->idx->service_id, &data);
     168        assert(rc == EOK);
     169        instance = (fat_instance_t *) data;
     170       
    164171        do {
    165172                rc = fat_directory_get(di, &d);
     
    177184                                long_entry_count--;
    178185                                if ((FAT_LFN_ORDER(d) == long_entry_count) &&
    179                                         (checksum == FAT_LFN_CHKSUM(d))) {
     186                                    (checksum == FAT_LFN_CHKSUM(d))) {
    180187                                        /* Right order! */
    181188                                        fat_lfn_get_entry(d, wname,
     
    189196                                        long_entry = false;
    190197                                }
    191                         } else if (FAT_IS_LFN(d)) {
     198                        } else if (FAT_IS_LFN(d) && instance->lfn_enabled) {
    192199                                /* We found Last long entry! */
    193200                                if (FAT_LFN_COUNT(d) <= FAT_LFN_MAX_COUNT) {
     
    308315                checksum = fat_dentry_chksum(de->name);
    309316
    310                 rc = fat_directory_seek(di, start_pos+long_entry_count);
     317                rc = fat_directory_seek(di, start_pos + long_entry_count);
    311318                if (rc != EOK)
    312319                        return rc;
Note: See TracChangeset for help on using the changeset viewer.