Changeset 647 for trunk/kernel/fs


Ignore:
Timestamp:
Oct 22, 2019, 1:48:51 PM (5 years ago)
Author:
alain
Message:

...miscelaneous...

Location:
trunk/kernel/fs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/fs/fatfs.c

    r635 r647  
    575575   
    576576    // 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 );
    578578 
    579579}  // end fatfs_update_ioc_fsinfo()
     
    11151115
    11161116    // 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 );
    11181118
    11191119    if ( error )
     
    11751175
    11761176    // 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 );
    11781178
    11791179    if ( error )
     
    23942394
    23952395    // 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 );
    23972397
    23982398    if ( error )
     
    24312431
    24322432        // 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 );
    24342434
    24352435        if ( error )
     
    27502750    // get page base address
    27512751    xptr_t    buffer_xp  = ppm_page2base( page_xp );
    2752     uint8_t * buffer_ptr = (uint8_t *)GET_PTR( buffer_xp );
    27532752 
    27542753    // get inode pointer from mapper
     
    27592758printk("\n[%s] thread[%x,%x] enters : %s / cxy %x / mapper %x / inode %x / page %x\n",
    27602759__FUNCTION__, this->process->pid, this->trdid,
    2761 dev_ioc_cmd_str( cmd_type ), page_cxy, mapper_ptr, inode_ptr, buffer_ptr );
     2760dev_ioc_cmd_str( cmd_type ), page_cxy, mapper_ptr, inode_ptr, GET_PTR(buffer_xp) );
    27622761#endif
    27632762
     
    27682767        uint32_t      lba = fatfs_ctx->fat_begin_lba + (page_id << 3);
    27692768 
    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 );
    27762771
    27772772        if( error )
     
    28312826        uint32_t lba = fatfs_lba_from_cluster( fatfs_ctx , searched_cluster );
    28322827
    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 );
    28392830
    28402831        if( error )
  • trunk/kernel/fs/vfs.c

    r635 r647  
    681681    process_t * process = this->process;
    682682
    683 #if DEBUG_VFS_OPEN
    684 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 #endif
    689 
    690683    // compute lookup working mode
    691684    lookup_mode = VFS_LOOKUP_OPEN;
     
    694687    if( (flags & O_EXCL   )      )  lookup_mode |= VFS_LOOKUP_EXCL;
    695688 
     689#if DEBUG_VFS_OPEN
     690uint32_t cycle = (uint32_t)hal_get_cycles();
     691if( DEBUG_VFS_OPEN < cycle )
     692printk("\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
    696696    // compute attributes for the created file
    697697    file_attr = 0;
Note: See TracChangeset for help on using the changeset viewer.