Changeset 380 for trunk/kernel/vfs


Ignore:
Timestamp:
Aug 14, 2017, 6:31:25 PM (7 years ago)
Author:
alain
Message:

Remove the generic kernel/kern/do_exception files to handle exceptions in HAL.
The HAL call only the vmm_handle_page_fault() function if required.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/vfs/vfs.c

    r367 r380  
    13511351    error_t            error;
    13521352
    1353     vfs_dmsg("\n[INFO] %s : enters for <%s> at cycle %d\n",
    1354              __FUNCTION__ , pathname , (uint32_t)hal_time_stamp() );
    1355 
    13561353    this    = CURRENT_THREAD;
    13571354    process = this->process;
     1355
     1356    vfs_dmsg("\n[INFO] %s : enter for <%s> / core[%x,%d] / cycle %d\n",
     1357    __FUNCTION__ , pathname , local_cxy , this->core->lid , hal_time_stamp() );
    13581358
    13591359    // get extended pointer on first inode to search
     
    13771377        vfs_get_name_from_path( current , name , &next , &last );
    13781378
    1379         vfs_dmsg("\n[INFO] %s : looking for <%s> / last = %d\n",
    1380                  __FUNCTION__ , name , last );
     1379        vfs_dmsg("\n[INFO] %s : looking for <%s> / core[%x,%d] / last = %d\n",
     1380        __FUNCTION__ , name , local_cxy , this->core->lid , last );
    13811381
    13821382        // search a child dentry matching name in parent inode
     
    13951395        if (found == false ) // child node not found in inode tree
    13961396        {
    1397             vfs_dmsg("\n[INFO] %s : <%s> not found, try to load it\n",
    1398                      __FUNCTION__ , name );
     1397            vfs_dmsg("\n[INFO] %s : <%s> not found => load it / core[%x,%d]\n",
     1398            __FUNCTION__ , local_cxy , this->core->lid );
    13991399
    14001400            // release lock on parent inode
     
    14231423            {
    14241424                printk("\n[ERROR] in %s : no memory for inode %s in path %s\n",
    1425                        __FUNCTION__ , name , pathname );
     1425                __FUNCTION__ , name , pathname );
    14261426                return ENOMEM;
    14271427            }
     
    14451445            if ( error )
    14461446            {
    1447                 printk("\n[ERROR] in %s : node %s not found in path %s\n",
    1448                        __FUNCTION__ , name , pathname );
     1447                printk("\n[ERROR] in %s : core[%x,%d] / <%s> not found in parent\n",
     1448                __FUNCTION__ , local_cxy , this->core->lid , name );
    14491449                return ENOENT;
    14501450            }
     
    14701470                if ( error )
    14711471                {
    1472                     printk("\n[ERROR] in %s : cannot access device for node %s in path %s\n",
    1473                            __FUNCTION__ , name , pathname );
     1472                    printk("\n[ERROR] in %s : core[%x,%d] cannot access device for <%s>\n",
     1473                    __FUNCTION__ , local_cxy , this->core->lid , name );
    14741474                    return EIO;
    14751475                }
     
    14821482        }
    14831483
    1484         vfs_dmsg("\n[INFO] %s : found <%s> / parent = %l / child = %l / last = %d\n",
    1485                      __FUNCTION__ , name , parent_xp , child_xp , last );
    1486 
    1487         // TODO check access rights
     1484        vfs_dmsg("\n[INFO] %s : found <%s> / core[%x,%d] / parent = %l / child = %l\n",
     1485        __FUNCTION__ , name , local_cxy , this->core->lid , parent_xp , child_xp );
     1486
     1487        // TODO check access rights here [AG]
    14881488        // error = vfs_access_denied( child_xp,
    14891489        //                            client_uid,
     
    15081508    vfs_inode_unlock( parent_xp );
    15091509
    1510     vfs_dmsg("\n[INFO] in %s : exit <%s> found / inode = %l\n",
     1510    vfs_dmsg("\n[INFO] %s : exit <%s> found / inode = %l\n",
    15111511                 __FUNCTION__ , pathname , child_xp );
    15121512
     
    16071607    parent_ptr = (vfs_inode_t *)GET_PTR( parent_xp );
    16081608
    1609     vfs_dmsg("\n[INFO] %s : enter in cluster %x for <%s> / child_cxy = %x / parent_xp = %l\n",
    1610     __FUNCTION__ , local_cxy , name , child_cxy , parent_xp );
     1609    vfs_dmsg("\n[INFO] %s : enter for <%s> / core[%x,%d] / child_cxy = %x / parent_xp = %l\n",
     1610    __FUNCTION__ , name , local_cxy , CURRENT_THREAD->core->lid , child_cxy , parent_xp );
    16111611
    16121612    // 1. create dentry
Note: See TracChangeset for help on using the changeset viewer.