Ignore:
File:
1 edited

Legend:

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

    r5d95f02 r32f623d9  
    262262{
    263263        int rc;
    264         bool enable_lfn = true; /* TODO: make this a mount option */
     264        void *data;
     265        fat_instance_t *instance;
     266
     267        rc = fs_instance_get(di->nodep->idx->service_id, &data);
     268        assert(rc == EOK);
     269        instance = (fat_instance_t *) data;
    265270       
    266271        if (fat_valid_short_name(name)) {
     
    277282                rc = fat_directory_write_dentry(di, de);
    278283                return rc;
    279         } else if (enable_lfn && fat_valid_name(name)) {
     284        } else if (instance->lfn_enabled && fat_valid_name(name)) {
    280285                /* We should create long entries to store name */
    281286                int long_entry_count;
     
    292297                if (lfn_size % FAT_LFN_ENTRY_SIZE)
    293298                        long_entry_count++;
    294                 rc = fat_directory_lookup_free(di, long_entry_count+1);
     299                rc = fat_directory_lookup_free(di, long_entry_count + 1);
    295300                if (rc != EOK)
    296301                        return rc;
     
    328333                FAT_LFN_ORDER(d) |= FAT_LFN_LAST;
    329334
    330                 rc = fat_directory_seek(di, start_pos+long_entry_count);
     335                rc = fat_directory_seek(di, start_pos + long_entry_count);
    331336                return rc;
    332337        }
Note: See TracChangeset for help on using the changeset viewer.