Changeset 40cdbec in mainline


Ignore:
Timestamp:
2011-09-24T21:26:24Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b3bf143, b69e4c0
Parents:
32f623d9
Message:

FAT can be mounted using nolfn mount option.

  • With nolfn, FAT will refuse to create LFN entries.
  • With nolfn, only 8.3 directory entries will be created.
  • nolfn does not have any impact on reading LFN entries.
File:
1 edited

Legend:

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

    r32f623d9 r40cdbec  
    871871    aoff64_t *size, unsigned *linkcnt)
    872872{
    873         enum cache_mode cmode;
     873        enum cache_mode cmode = CACHE_MODE_WB;
    874874        fat_bs_t *bs;
    875875        fat_instance_t *instance;
     
    879879        if (!instance)
    880880                return ENOMEM;
    881 
    882881        instance->lfn_enabled = true;
    883882
    884         /* Check for option enabling write through. */
    885         if (str_cmp(opts, "wtcache") == 0)
    886                 cmode = CACHE_MODE_WT;
    887         else
    888                 cmode = CACHE_MODE_WB;
     883        /* Parse mount options. */
     884        char *mntopts = (char *) opts;
     885        char *saveptr;
     886        char *opt;
     887        while ((opt = strtok_r(mntopts, " ,", &saveptr)) != NULL) {
     888                if (str_cmp(opt, "wtcache") == 0)
     889                        cmode = CACHE_MODE_WT;
     890                else if (str_cmp(opt, "nolfn") == 0)
     891                        instance->lfn_enabled = false;
     892                mntopts = NULL;
     893        }
    889894
    890895        /* initialize libblock */
Note: See TracChangeset for help on using the changeset viewer.