Changeset 842a2d2 in mainline for uspace/srv/fs/fat/fat_dentry.c
- Timestamp:
- 2011-08-21T18:09:05Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 375ab5e
- Parents:
- 9fbe05e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_dentry.c
r9fbe05e r842a2d2 269 269 { 270 270 int i; 271 for (i= 1; i>=0 && *offset>0; i--) {271 for (i=FAT_LFN_PART3_SIZE-1; i>=0 && *offset>0; i--) { 272 272 if (d->lfn.part3[i] == 0 || d->lfn.part3[i] == FAT_LFN_PAD) 273 273 continue; … … 275 275 dst[(*offset)] = uint16_t_le2host(d->lfn.part3[i]); 276 276 } 277 for (i= 5; i>=0 && *offset>0; i--) {277 for (i=FAT_LFN_PART2_SIZE-1; i>=0 && *offset>0; i--) { 278 278 if (d->lfn.part2[i] == 0 || d->lfn.part2[i] == FAT_LFN_PAD) 279 279 continue; … … 281 281 dst[(*offset)] = uint16_t_le2host(d->lfn.part2[i]); 282 282 } 283 for (i= 4; i>=0 && *offset>0; i--) {283 for (i=FAT_LFN_PART1_SIZE-1; i>=0 && *offset>0; i--) { 284 284 if (d->lfn.part1[i] == 0 || d->lfn.part1[i] == FAT_LFN_PAD) 285 285 continue; … … 293 293 { 294 294 size_t idx; 295 for (idx=0; idx < 5; idx++) {295 for (idx=0; idx < FAT_LFN_PART1_SIZE; idx++) { 296 296 if (*offset < size) { 297 297 d->lfn.part1[idx] = host2uint16_t_le(src[*offset]); … … 301 301 d->lfn.part1[idx] = FAT_LFN_PAD; 302 302 } 303 for (idx=0; idx < 6; idx++) {303 for (idx=0; idx < FAT_LFN_PART2_SIZE; idx++) { 304 304 if (*offset < size) { 305 305 d->lfn.part2[idx] = host2uint16_t_le(src[*offset]); … … 309 309 d->lfn.part2[idx] = FAT_LFN_PAD; 310 310 } 311 for (idx=0; idx < 2; idx++) {311 for (idx=0; idx < FAT_LFN_PART3_SIZE; idx++) { 312 312 if (*offset < size) { 313 313 d->lfn.part3[idx] = host2uint16_t_le(src[*offset]);
Note:
See TracChangeset
for help on using the changeset viewer.