Changeset 7ece4247 in mainline for uspace/srv/fs/fat/fat_ops.c
- Timestamp:
- 2011-08-26T23:36:00Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0be611b
- Parents:
- 4bf6895
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_ops.c
r4bf6895 r7ece4247 315 315 nodep->firstc = uint16_t_le2host(d->firstc_lo) | 316 316 (uint16_t_le2host(d->firstc_hi) << 16); 317 } 318 else 317 } else 319 318 nodep->firstc = uint16_t_le2host(d->firstc); 320 319 … … 333 332 */ 334 333 uint32_t clusters; 335 rc = fat_clusters_get(&clusters, bs, idxp->service_id, nodep->firstc); 334 rc = fat_clusters_get(&clusters, bs, idxp->service_id, 335 nodep->firstc); 336 336 if (rc != EOK) { 337 337 (void) block_put(b); … … 392 392 /* hit */ 393 393 fat_node_t *nodep; 394 aoff64_t o = di.pos % (BPS(di.bs) / sizeof(fat_dentry_t)); 394 aoff64_t o = di.pos % 395 (BPS(di.bs) / sizeof(fat_dentry_t)); 395 396 fat_idx_t *idx = fat_idx_get_by_pos(service_id, 396 397 parentp->firstc, di.bnum * DPS(di.bs) + o); 397 398 if (!idx) { 398 399 /* … … 615 616 616 617 rc = fat_directory_write(&di, name, &de); 617 if (rc !=EOK)618 if (rc != EOK) 618 619 return rc; 619 620 rc = fat_directory_close(&di); 620 if (rc !=EOK)621 if (rc != EOK) 621 622 return rc; 622 623 … … 713 714 714 715 fat_directory_t di; 715 rc = fat_directory_open(parentp, &di);716 rc = fat_directory_open(parentp, &di); 716 717 if (rc != EOK) 717 718 goto error; … … 1089 1090 fat_directory_t di; 1090 1091 rc = fat_directory_open(nodep, &di); 1091 if (rc != EOK) goto err; 1092 if (rc != EOK) 1093 goto err; 1092 1094 rc = fat_directory_seek(&di, pos); 1093 1095 if (rc != EOK) { … … 1097 1099 1098 1100 rc = fat_directory_read(&di, name, &d); 1099 if (rc == EOK) goto hit; 1100 if (rc == ENOENT) goto miss; 1101 if (rc == EOK) 1102 goto hit; 1103 if (rc == ENOENT) 1104 goto miss; 1101 1105 1102 1106 err: … … 1107 1111 miss: 1108 1112 rc = fat_directory_close(&di); 1109 if (rc !=EOK)1113 if (rc != EOK) 1110 1114 goto err; 1111 1115 rc = fat_node_put(fn); … … 1117 1121 pos = di.pos; 1118 1122 rc = fat_directory_close(&di); 1119 if (rc !=EOK)1123 if (rc != EOK) 1120 1124 goto err; 1121 (void) async_data_read_finalize(callid, name, str_size(name) + 1); 1122 bytes = (pos - spos)+1; 1125 (void) async_data_read_finalize(callid, name, 1126 str_size(name) + 1); 1127 bytes = (pos - spos) + 1; 1123 1128 } 1124 1129
Note:
See TracChangeset
for help on using the changeset viewer.