Changeset 647 for trunk/kernel/fs
- Timestamp:
- Oct 22, 2019, 1:48:51 PM (5 years ago)
- Location:
- trunk/kernel/fs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/fs/fatfs.c
r635 r647 575 575 576 576 // update the FS_INFO sector on IOC device 577 return dev_ioc_ sync_write(fs_info_buffer_xp , fs_info_lba , 1 );577 return dev_ioc_move_data( IOC_SYNC_WRITE , fs_info_buffer_xp , fs_info_lba , 1 ); 578 578 579 579 } // end fatfs_update_ioc_fsinfo() … … 1115 1115 1116 1116 // load the BOOT record from device 1117 error = dev_ioc_ sync_read(buffer_xp , 0 , 1 );1117 error = dev_ioc_move_data( IOC_SYNC_READ , buffer_xp , 0 , 1 ); 1118 1118 1119 1119 if ( error ) … … 1175 1175 1176 1176 // load the FS_INFO record from device 1177 error = dev_ioc_ sync_read(buffer_xp , fs_info_lba , 1 );1177 error = dev_ioc_move_data( IOC_SYNC_READ , buffer_xp , fs_info_lba , 1 ); 1178 1178 1179 1179 if ( error ) … … 2394 2394 2395 2395 // copy FS_INFO sector from IOC to local buffer 2396 error = dev_ioc_ sync_read(tmp_buf_xp , fs_info_lba , 1 );2396 error = dev_ioc_move_data( IOC_SYNC_READ , tmp_buf_xp , fs_info_lba , 1 ); 2397 2397 2398 2398 if ( error ) … … 2431 2431 2432 2432 // update the FS_INFO sector on IOC device 2433 error = dev_ioc_ sync_write(fs_info_buffer_xp , fs_info_lba , 1 );2433 error = dev_ioc_move_data( IOC_SYNC_WRITE , fs_info_buffer_xp , fs_info_lba , 1 ); 2434 2434 2435 2435 if ( error ) … … 2750 2750 // get page base address 2751 2751 xptr_t buffer_xp = ppm_page2base( page_xp ); 2752 uint8_t * buffer_ptr = (uint8_t *)GET_PTR( buffer_xp );2753 2752 2754 2753 // get inode pointer from mapper … … 2759 2758 printk("\n[%s] thread[%x,%x] enters : %s / cxy %x / mapper %x / inode %x / page %x\n", 2760 2759 __FUNCTION__, this->process->pid, this->trdid, 2761 dev_ioc_cmd_str( cmd_type ), page_cxy, mapper_ptr, inode_ptr, buffer_ptr);2760 dev_ioc_cmd_str( cmd_type ), page_cxy, mapper_ptr, inode_ptr, GET_PTR(buffer_xp) ); 2762 2761 #endif 2763 2762 … … 2768 2767 uint32_t lba = fatfs_ctx->fat_begin_lba + (page_id << 3); 2769 2768 2770 // access device 2771 if (cmd_type == IOC_SYNC_READ ) error = dev_ioc_sync_read ( buffer_xp , lba , 8 ); 2772 else if(cmd_type == IOC_SYNC_WRITE) error = dev_ioc_sync_write( buffer_xp , lba , 8 ); 2773 else if(cmd_type == IOC_READ ) error = dev_ioc_read ( buffer_ptr , lba , 8 ); 2774 else if(cmd_type == IOC_WRITE ) error = dev_ioc_write ( buffer_ptr , lba , 8 ); 2775 else error = -1; 2769 // access IOC device 2770 error = dev_ioc_move_data( cmd_type , buffer_xp , lba , 8 ); 2776 2771 2777 2772 if( error ) … … 2831 2826 uint32_t lba = fatfs_lba_from_cluster( fatfs_ctx , searched_cluster ); 2832 2827 2833 // access device 2834 if (cmd_type == IOC_SYNC_READ ) error = dev_ioc_sync_read ( buffer_xp , lba , 8 ); 2835 else if(cmd_type == IOC_SYNC_WRITE) error = dev_ioc_sync_write( buffer_xp , lba , 8 ); 2836 else if(cmd_type == IOC_READ ) error = dev_ioc_read ( buffer_ptr , lba , 8 ); 2837 else if(cmd_type == IOC_WRITE ) error = dev_ioc_write ( buffer_ptr , lba , 8 ); 2838 else error = -1; 2828 // access IOC device 2829 error = dev_ioc_move_data( cmd_type , buffer_xp , lba , 8 ); 2839 2830 2840 2831 if( error ) -
trunk/kernel/fs/vfs.c
r635 r647 681 681 process_t * process = this->process; 682 682 683 #if DEBUG_VFS_OPEN684 uint32_t cycle = (uint32_t)hal_get_cycles();685 if( DEBUG_VFS_OPEN < cycle )686 printk("\n[%s] thread[%x,%x] enter for <%s> / root_inode (%x,%x) / cycle %d\n",687 __FUNCTION__, process->pid, this->trdid, path, GET_CXY(root_xp), GET_PTR(root_xp), cycle );688 #endif689 690 683 // compute lookup working mode 691 684 lookup_mode = VFS_LOOKUP_OPEN; … … 694 687 if( (flags & O_EXCL ) ) lookup_mode |= VFS_LOOKUP_EXCL; 695 688 689 #if DEBUG_VFS_OPEN 690 uint32_t cycle = (uint32_t)hal_get_cycles(); 691 if( DEBUG_VFS_OPEN < cycle ) 692 printk("\n[%s] thread[%x,%x] enter for <%s> / root_inode (%x,%x) / cycle %d\n", 693 __FUNCTION__, process->pid, this->trdid, path, GET_CXY(root_xp), GET_PTR(root_xp), cycle ); 694 #endif 695 696 696 // compute attributes for the created file 697 697 file_attr = 0;
Note: See TracChangeset
for help on using the changeset viewer.