Changeset 44c6091f in mainline for uspace/srv/fs/minixfs/mfs_ops.c
- Timestamp:
- 2011-04-30T12:24:14Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fdc05ca
- Parents:
- 8a49fed
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/minixfs/mfs_ops.c
r8a49fed r44c6091f 38 38 39 39 static bool check_magic_number(uint16_t magic, bool *native, 40 40 mfs_version_t *version, bool *longfilenames); 41 41 static int mfs_node_core_get(fs_node_t **rfn, struct mfs_instance *inst, 42 fs_index_t index);42 fs_index_t index); 43 43 44 44 static int mfs_node_put(fs_node_t *fsnode); … … 85 85 { 86 86 devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request); 87 enum cache_mode cmode; 87 enum cache_mode cmode; 88 88 struct mfs_superblock *sb; 89 89 struct mfs3_superblock *sb3; … … 97 97 char *opts; 98 98 int rc = async_data_write_accept((void **) &opts, true, 0, 0, 0, NULL); 99 99 100 100 if (rc != EOK) { 101 101 mfsdebug("Can't accept async data write\n"); … … 212 212 sbi->dirsize = longnames ? MFSL_DIRSIZE : MFS_DIRSIZE; 213 213 sbi->max_name_len = longnames ? MFS_L_MAX_NAME_LEN : 214 MFS_MAX_NAME_LEN;214 MFS_MAX_NAME_LEN; 215 215 } 216 216 sbi->itable_off = 2 + sbi->ibmap_blocks + sbi->zbmap_blocks; 217 217 218 218 free(sb); 219 219 … … 259 259 fs_node_t *fsnode; 260 260 uint32_t inum; 261 261 262 262 mfsdebug("create_node()\n"); 263 263 … … 287 287 goto out_err_1; 288 288 } 289 289 290 290 fsnode = malloc(sizeof(fs_node_t)); 291 291 if (!fsnode) { … … 365 365 /*Hit!*/ 366 366 mfs_node_core_get(rfn, mnode->instance, 367 d_info->d_inum);367 d_info->d_inum); 368 368 free(d_info); 369 369 goto found; … … 445 445 446 446 static int mfs_node_core_get(fs_node_t **rfn, struct mfs_instance *inst, 447 fs_index_t index)447 fs_index_t index) 448 448 { 449 449 fs_node_t *node = NULL; … … 546 546 547 547 struct mfs_dentry_info *d_info; 548 548 549 549 /* The first two dentries are always . and .. */ 550 550 int i = 2; … … 586 586 fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request); 587 587 aoff64_t pos = (aoff64_t) MERGE_LOUP32(IPC_GET_ARG3(*request), 588 IPC_GET_ARG4(*request));588 IPC_GET_ARG4(*request)); 589 589 fs_node_t *fn; 590 590 … … 643 643 found: 644 644 async_data_read_finalize(callid, d_info->d_name, 645 str_size(d_info->d_name) + 1);645 str_size(d_info->d_name) + 1); 646 646 bytes = ((pos - spos) + 1); 647 647 } else { … … 673 673 memset(buf, 0, sizeof(sbi->block_size)); 674 674 async_data_read_finalize(callid, 675 675 buf + pos % sbi->block_size, bytes); 676 676 free(buf); 677 677 goto out_success; … … 682 682 683 683 async_data_read_finalize(callid, b->data + 684 pos % sbi->block_size, bytes);684 pos % sbi->block_size, bytes); 685 685 686 686 rc = block_put(b); … … 695 695 async_answer_1(rid, rc, (sysarg_t)bytes); 696 696 return; 697 out_error: ; 697 out_error: 698 ; 698 699 int tmp = mfs_node_put(fn); 699 700 async_answer_0(callid, tmp != EOK ? tmp : rc); … … 709 710 fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request); 710 711 aoff64_t pos = (aoff64_t) MERGE_LOUP32(IPC_GET_ARG3(*request), 711 712 IPC_GET_ARG4(*request)); 712 713 713 714 fs_node_t *fn; … … 835 836 for (link = inst_list.next; link != &inst_list; link = link->next) { 836 837 instance_ptr = list_get_instance(link, struct mfs_instance, 837 link);838 838 link); 839 839 840 if (instance_ptr->handle == handle) { 840 841 *instance = instance_ptr; … … 851 852 852 853 static bool check_magic_number(uint16_t magic, bool *native, 853 854 mfs_version_t *version, bool *longfilenames) 854 855 { 855 856 bool rc = true; … … 893 894 /** 894 895 * @} 895 */ 896 896 */ 897
Note:
See TracChangeset
for help on using the changeset viewer.