Changes in uspace/srv/fs/exfat/exfat_fat.c [cde999a:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/exfat/exfat_fat.c
rcde999a rb7fd2a0 73 73 * @return EOK on success or an error code. 74 74 */ 75 int75 errno_t 76 76 exfat_cluster_walk(exfat_bs_t *bs, service_id_t service_id, 77 77 exfat_cluster_t firstc, exfat_cluster_t *lastc, uint32_t *numc, … … 80 80 uint32_t clusters = 0; 81 81 exfat_cluster_t clst = firstc; 82 int rc;82 errno_t rc; 83 83 84 84 if (firstc < EXFAT_CLST_FIRST) { … … 122 122 * @return EOK on success or an error code. 123 123 */ 124 int124 errno_t 125 125 exfat_block_get(block_t **block, exfat_bs_t *bs, exfat_node_t *nodep, 126 126 aoff64_t bn, int flags) … … 129 129 exfat_cluster_t currc = 0; 130 130 aoff64_t relbn = bn; 131 int rc;131 errno_t rc; 132 132 133 133 if (!nodep->size) … … 186 186 * @return EOK on success or an error code. 187 187 */ 188 int188 errno_t 189 189 exfat_block_get_by_clst(block_t **block, exfat_bs_t *bs, 190 190 service_id_t service_id, bool fragmented, exfat_cluster_t fcl, … … 194 194 uint32_t max_clusters; 195 195 exfat_cluster_t c = EXFAT_CLST_FIRST; 196 int rc;196 errno_t rc; 197 197 198 198 if (fcl < EXFAT_CLST_FIRST || fcl > DATA_CNT(bs) + 2) … … 229 229 * @return EOK or an error code. 230 230 */ 231 int231 errno_t 232 232 exfat_get_cluster(exfat_bs_t *bs, service_id_t service_id, 233 233 exfat_cluster_t clst, exfat_cluster_t *value) … … 235 235 block_t *b; 236 236 aoff64_t offset; 237 int rc;237 errno_t rc; 238 238 239 239 offset = clst * sizeof(exfat_cluster_t); … … 259 259 * @return EOK on success or an error code. 260 260 */ 261 int261 errno_t 262 262 exfat_set_cluster(exfat_bs_t *bs, service_id_t service_id, 263 263 exfat_cluster_t clst, exfat_cluster_t value) … … 265 265 block_t *b; 266 266 aoff64_t offset; 267 int rc;267 errno_t rc; 268 268 269 269 offset = clst * sizeof(exfat_cluster_t); … … 297 297 * @return EOK on success, an error code otherwise. 298 298 */ 299 int299 errno_t 300 300 exfat_alloc_clusters(exfat_bs_t *bs, service_id_t service_id, unsigned nclsts, 301 301 exfat_cluster_t *mcl, exfat_cluster_t *lcl) … … 304 304 unsigned found = 0; /* top of the free cluster number stack */ 305 305 exfat_cluster_t clst; 306 int rc = EOK;306 errno_t rc = EOK; 307 307 308 308 lifo = (exfat_cluster_t *) malloc(nclsts * sizeof(exfat_cluster_t)); … … 363 363 * @return EOK on success or an error code. 364 364 */ 365 int365 errno_t 366 366 exfat_free_clusters(exfat_bs_t *bs, service_id_t service_id, exfat_cluster_t firstc) 367 367 { 368 368 exfat_cluster_t nextc; 369 int rc;369 errno_t rc; 370 370 371 371 /* Mark all clusters in the chain as free */ … … 396 396 * @return EOK on success or an error code. 397 397 */ 398 int398 errno_t 399 399 exfat_append_clusters(exfat_bs_t *bs, exfat_node_t *nodep, exfat_cluster_t mcl, 400 400 exfat_cluster_t lcl) … … 402 402 service_id_t service_id = nodep->idx->service_id; 403 403 exfat_cluster_t lastc = 0; 404 int rc;404 errno_t rc; 405 405 406 406 if (nodep->firstc == 0) { … … 440 440 * @return EOK on success or an error code. 441 441 */ 442 int exfat_chop_clusters(exfat_bs_t *bs, exfat_node_t *nodep, exfat_cluster_t lcl)443 { 444 int rc;442 errno_t exfat_chop_clusters(exfat_bs_t *bs, exfat_node_t *nodep, exfat_cluster_t lcl) 443 { 444 errno_t rc; 445 445 service_id_t service_id = nodep->idx->service_id; 446 446 … … 486 486 } 487 487 488 int488 errno_t 489 489 exfat_zero_cluster(exfat_bs_t *bs, service_id_t service_id, exfat_cluster_t c) 490 490 { 491 491 size_t i; 492 492 block_t *b; 493 int rc;493 errno_t rc; 494 494 495 495 for (i = 0; i < SPC(bs); i++) { … … 508 508 } 509 509 510 int510 errno_t 511 511 exfat_read_uctable(exfat_bs_t *bs, exfat_node_t *nodep, uint8_t *uctable) 512 512 { 513 513 size_t i, blocks, count; 514 514 block_t *b; 515 int rc;515 errno_t rc; 516 516 blocks = ROUND_UP(nodep->size, BPS(bs))/BPS(bs); 517 517 count = BPS(bs); … … 540 540 * does not contain a exfat file system. 541 541 */ 542 int exfat_sanity_check(exfat_bs_t *bs)542 errno_t exfat_sanity_check(exfat_bs_t *bs) 543 543 { 544 544 if (str_cmp((char const *)bs->oem_name, "EXFAT "))
Note:
See TracChangeset
for help on using the changeset viewer.