Changeset a35b458 in mainline for uspace/srv/fs/fat/fat_directory.c
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_directory.c
r3061bc1 ra35b458 65 65 { 66 66 errno_t rc = EOK; 67 67 68 68 if (di->b) 69 69 rc = block_put(di->b); 70 70 71 71 return rc; 72 72 } … … 106 106 if (rc != EOK) 107 107 di->pos -= 1; 108 108 109 109 return rc; 110 110 } … … 113 113 { 114 114 errno_t rc = EOK; 115 115 116 116 if (di->pos > 0) { 117 117 di->pos -= 1; … … 119 119 } else 120 120 return ENOENT; 121 121 122 122 if (rc != EOK) 123 123 di->pos += 1; 124 124 125 125 return rc; 126 126 } … … 135 135 if (rc != EOK) 136 136 di->pos = _pos; 137 137 138 138 return rc; 139 139 } … … 142 142 { 143 143 errno_t rc; 144 144 145 145 rc = fat_directory_block_load(di); 146 146 if (rc == EOK) { … … 148 148 *d = ((fat_dentry_t *)di->b->data) + o; 149 149 } 150 150 151 151 return rc; 152 152 } … … 168 168 assert(rc == EOK); 169 169 instance = (fat_instance_t *) data; 170 170 171 171 do { 172 172 rc = fat_directory_get(di, &d); … … 220 220 } else 221 221 fat_dentry_name_get(d, name); 222 222 223 223 *de = d; 224 224 return EOK; … … 232 232 } 233 233 } while (fat_directory_next(di) == EOK); 234 234 235 235 return ENOENT; 236 236 } … … 250 250 d->name[0] = FAT_DENTRY_ERASED; 251 251 di->b->dirty = true; 252 252 253 253 while (!flag && fat_directory_prev(di) == EOK) { 254 254 if (fat_directory_get(di, &d) == EOK && … … 276 276 assert(rc == EOK); 277 277 instance = (fat_instance_t *) data; 278 278 279 279 if (fat_valid_short_name(name)) { 280 280 /* … … 296 296 uint16_t wname[FAT_LFN_NAME_LEN]; 297 297 size_t lfn_size, lfn_offset; 298 298 299 299 rc = str_to_utf16(wname, FAT_LFN_NAME_LEN, name); 300 300 if (rc != EOK) 301 301 return rc; 302 302 303 303 lfn_size = utf16_wsize(wname); 304 304 long_entry_count = lfn_size / FAT_LFN_ENTRY_SIZE; … … 440 440 di->nodep->dirty = true; /* need to sync node */ 441 441 di->blocks = di->nodep->size / BPS(di->bs); 442 442 443 443 return EOK; 444 444 } … … 450 450 aoff64_t pos; 451 451 errno_t rc; 452 452 453 453 do { 454 454 found = 0;
Note:
See TracChangeset
for help on using the changeset viewer.