Changeset cfac897 in mainline
- Timestamp:
- 2011-04-21T19:26:34Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 48de019
- Parents:
- adddd75
- Location:
- uspace/srv/fs/minixfs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/minixfs/mfs_inode.c
radddd75 rcfac897 234 234 BLOCK_FLAGS_NONE); 235 235 236 if (r != EOK) 237 goto out; 236 on_error(r, goto out); 238 237 239 238 struct mfs_inode *ino = b->data; … … 277 276 BLOCK_FLAGS_NONE); 278 277 279 if (r != EOK) 280 goto out; 278 on_error(r, goto out); 281 279 282 280 struct mfs2_inode *ino2 = b->data; … … 338 336 339 337 r = mfs_alloc_bit(mnode->instance, &new_zone, BMAP_ZONE); 340 if (r != EOK) 341 return r; 338 on_error(r, return r); 342 339 343 340 mfsdebug("write_map = %d\n", (int) ((start_zone + i) * bs)); … … 346 343 r = block_get(&b, mnode->instance->handle, new_zone, 347 344 BLOCK_FLAGS_NOREAD); 348 if (r != EOK) 349 return r; 345 on_error(r, return r); 350 346 351 347 memset(b->data, 0, bs); … … 355 351 r = write_map(mnode, (start_zone + i) * bs, 356 352 new_zone, &dummy); 357 if (r != EOK) 358 return r;353 354 on_error(r, return r); 359 355 360 356 ino_i->i_size += bs; -
uspace/srv/fs/minixfs/mfs_ops.c
radddd75 rcfac897 265 265 266 266 r = mfs_instance_get(handle, &inst); 267 if (r != EOK) 268 return r; 267 on_error(r, return r); 269 268 270 269 if (flags & L_DIRECTORY) { … … 275 274 /*Alloc a new inode*/ 276 275 r = mfs_alloc_bit(inst, &inum, BMAP_INODE); 277 if (r != EOK) 278 return r; 276 on_error(r, return r); 279 277 280 278 struct mfs_ino_info *ino_i; … … 318 316 319 317 r = put_inode(mnode); 320 if (r != EOK) 321 goto out_err_2; 318 on_error(r, goto out_err_2); 322 319 323 320 fs_node_initialize(fsnode); … … 353 350 while (1) { 354 351 r = read_directory_entry(mnode, &d_info, i++); 355 if (r != EOK) 356 return r; 352 on_error(r, return r); 357 353 358 354 if (!d_info) { … … 395 391 void mfs_stat(ipc_callid_t rid, ipc_call_t *request) 396 392 { 397 mfsdebug("mfs_stat()\n");398 393 libfs_stat(&mfs_libfs_ops, mfs_reg.fs_handle, rid, request); 399 394 } … … 406 401 407 402 rc = mfs_instance_get(devmap_handle, &instance); 408 409 if (rc != EOK) 410 return rc; 403 on_error(rc, return rc); 411 404 412 405 return mfs_node_core_get(rfn, instance, index); … … 477 470 478 471 rc = get_inode(inst, &ino_i, index); 479 if (rc != EOK) 480 goto out_err; 472 on_error(rc, goto out_err); 481 473 482 474 ino_i->index = index; … … 557 549 while (1) { 558 550 r = read_directory_entry(mnode, &d_info, i++); 559 if (r != EOK) 560 return r; 551 on_error(r, return r); 561 552 562 553 if (!d_info) { … … 627 618 while (1) { 628 619 rc = read_directory_entry(mnode, &d_info, pos); 629 if (rc != EOK) 630 goto out_error; 620 on_error(rc, goto out_error); 631 621 632 622 if (!d_info) { … … 670 660 671 661 rc = read_map(&zone, mnode, pos); 672 if (rc != EOK) 673 goto out_error; 662 on_error(rc, goto out_error); 674 663 675 664 if (zone == 0) { … … 688 677 689 678 rc = block_get(&b, handle, zone, BLOCK_FLAGS_NONE); 690 if (rc != EOK) 691 goto out_error; 679 on_error(rc, goto out_error); 692 680 693 681 async_data_read_finalize(callid, b->data + … … 738 726 mfs_version_t *version, bool *longfilenames) 739 727 { 740 bool rc = false;728 bool rc = true; 741 729 *longfilenames = false; 742 730 … … 744 732 *native = magic == MFS_MAGIC_V1; 745 733 *version = MFS_VERSION_V1; 746 rc = true;747 734 } else if (magic == MFS_MAGIC_V1L || magic == MFS_MAGIC_V1LR) { 748 735 *native = magic == MFS_MAGIC_V1L; 749 736 *version = MFS_VERSION_V1; 750 737 *longfilenames = true; 751 rc = true;752 738 } else if (magic == MFS_MAGIC_V2 || magic == MFS_MAGIC_V2R) { 753 739 *native = magic == MFS_MAGIC_V2; 754 740 *version = MFS_VERSION_V2; 755 rc = true;756 741 } else if (magic == MFS_MAGIC_V2L || magic == MFS_MAGIC_V2LR) { 757 742 *native = magic == MFS_MAGIC_V2L; 758 743 *version = MFS_VERSION_V2; 759 744 *longfilenames = true; 760 rc = true;761 745 } else if (magic == MFS_MAGIC_V3 || magic == MFS_MAGIC_V3R) { 762 746 *native = magic == MFS_MAGIC_V3; 763 747 *version = MFS_VERSION_V3; 764 rc = true;765 }748 } else 749 rc = false; 766 750 767 751 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.