Changeset d2e9c47 in mainline


Ignore:
Timestamp:
2008-08-10T09:19:32Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
da349da0
Parents:
2dd7288
Message:

Several fixes for the FAT file system:

  • do not copy padding during file name canonization
  • properly nul-terminate the FAT file name during canonization
  • compare FAT file name and the component name case insensitively
  • block_get() takes a block offset, not byte offset as parameter
File:
1 edited

Legend:

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

    r2dd7288 rd2e9c47  
    7676
    7777        for (i = 0; i < FAT_NAME_LEN; i++) {
    78                 if (d->name[i] == FAT_PAD) {
    79                         buf++;
     78                if (d->name[i] == FAT_PAD)
    8079                        break;
    81                 }
    8280                if (d->name[i] == FAT_DENTRY_E5_ESC)
    8381                        *buf++ = 0xe5;
     
    9795                        *buf++ = d->ext[i];
    9896        }
     97        *buf = '\0';
    9998}
    10099
     
    114113        off_t bufpos = 0;
    115114        size_t buflen = 0;
     115        off_t pos = offset * bs;
    116116
    117117        assert(dev_phone != -1);
     
    129129        b->size = bs;
    130130
    131         if (!libfs_blockread(dev_phone, dev_buffer, &bufpos, &buflen, &offset,
     131        if (!libfs_blockread(dev_phone, dev_buffer, &bufpos, &buflen, &pos,
    132132            b->data, bs, bs)) {
    133133                free(b->data);
     
    458458                                break;
    459459                        }
    460                         if (strcmp(name, component) == 0) {
     460                        if (stricmp(name, component) == 0) {
    461461                                /* hit */
    462462                                void *node;
Note: See TracChangeset for help on using the changeset viewer.