Ignore:
Timestamp:
Nov 19, 2020, 11:54:16 PM (3 years ago)
Author:
alain
Message:

Introduce the DEBUG_VFS_ERROR in kernel_config to make
error messges display conditional.

File:
1 edited

Legend:

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

    r657 r673  
    33 *
    44 * Author   Mohamed Lamine Karaoui (2014,2015)
    5  *          Alain Greiner (2016,2017,2018,2019,2020)
     5 *          Alain Greiner          (2016,2017,2018,2019,2020)
    66 *
    77 * Copyright (c) Sorbonne Universites
     
    124124    // update inode "type" field
    125125    inode = GET_PTR( *devfs_dev_inode_xp );
    126     inode->type = INODE_TYPE_DIR;
     126    inode->type = FILE_TYPE_DIR;
    127127 
    128128    // create dentries <.> and <..> in <dev>
     
    154154    // update inode "type" field
    155155    inode = GET_PTR( *devfs_external_inode_xp );
    156     inode->type = INODE_TYPE_DIR;
     156    inode->type = FILE_TYPE_DIR;
    157157 
    158158    // create dentries <.> and <..> in <external>
     
    201201
    202202    // create <internal> directory
    203     snprintf( node_name , 16 , "internal_%x" , local_cxy );
     203    snprintk( node_name , 16 , "internal_%x" , local_cxy );
    204204
    205205    error = vfs_add_child_in_parent( local_cxy,              // target cluster
     
    212212    // set <internal> inode "type" field
    213213    internal_inode_ptr       = GET_PTR( internal_inode_xp );
    214     internal_inode_ptr->type = INODE_TYPE_DEV;
     214    internal_inode_ptr->type = FILE_TYPE_DEV;
    215215 
    216216    // create dentries <.> and <..> in <internal>
     
    262262        inode_ptr = GET_PTR( inode_xp );
    263263        inode_ptr->extend = chdev_ptr;
    264         inode_ptr->type   = INODE_TYPE_DEV;
     264        inode_ptr->type   = FILE_TYPE_DEV;
    265265       
    266266#if DEBUG_DEVFS_LOCAL_INIT
     
    305305            inode_ptr = GET_PTR( inode_xp );
    306306            inode_ptr->extend = chdev_ptr;
    307             inode_ptr->type   = INODE_TYPE_DEV;
     307            inode_ptr->type   = FILE_TYPE_DEV;
    308308       
    309309#if DEBUG_DEVFS_LOCAL_INIT
     
    341341            inode_ptr = GET_PTR( inode_xp );
    342342            inode_ptr->extend = chdev_ptr;
    343             inode_ptr->type   = INODE_TYPE_DEV;
     343            inode_ptr->type   = FILE_TYPE_DEV;
    344344       
    345345#if DEBUG_DEVFS_LOCAL_INIT
     
    378378            inode_ptr = GET_PTR( inode_xp );
    379379            inode_ptr->extend = chdev_ptr;
    380             inode_ptr->type   = INODE_TYPE_DEV;
     380            inode_ptr->type   = FILE_TYPE_DEV;
    381381       
    382382#if DEBUG_DEVFS_LOCAL_INIT
     
    417417                inode_ptr = GET_PTR( inode_xp );
    418418                inode_ptr->extend = chdev_ptr;
    419                 inode_ptr->type   = INODE_TYPE_DEV;
     419                inode_ptr->type   = FILE_TYPE_DEV;
    420420       
    421421#if DEBUG_DEVFS_LOCAL_INIT
     
    456456                inode_ptr = GET_PTR( inode_xp );
    457457                inode_ptr->extend = chdev_ptr;
    458                 inode_ptr->type   = INODE_TYPE_DEV;
     458                inode_ptr->type   = FILE_TYPE_DEV;
    459459       
    460460#if DEBUG_DEVFS_LOCAL_INIT
     
    495495                inode_ptr = GET_PTR( inode_xp );
    496496                inode_ptr->extend = chdev_ptr;
    497                 inode_ptr->type   = INODE_TYPE_DEV;
     497                inode_ptr->type   = FILE_TYPE_DEV;
    498498       
    499499#if DEBUG_DEVFS_LOCAL_INIT
     
    534534                inode_ptr = GET_PTR( inode_xp );
    535535                inode_ptr->extend = chdev_ptr;
    536                 inode_ptr->type   = INODE_TYPE_DEV;
     536                inode_ptr->type   = FILE_TYPE_DEV;
    537537       
    538538#if DEBUG_DEVFS_LOCAL_INIT
     
    573573                inode_ptr = GET_PTR( inode_xp );
    574574                inode_ptr->extend = chdev_ptr;
    575                 inode_ptr->type   = INODE_TYPE_DEV;
     575                inode_ptr->type   = FILE_TYPE_DEV;
    576576 
    577577#if DEBUG_DEVFS_LOCAL_INIT
     
    612612                inode_ptr = GET_PTR( inode_xp );
    613613                inode_ptr->extend = chdev_ptr;
    614                 inode_ptr->type   = INODE_TYPE_DEV;
     614                inode_ptr->type   = FILE_TYPE_DEV;
    615615       
    616616#if DEBUG_DEVFS_LOCAL_INIT
     
    643643    char             k_buf[CONFIG_TXT_KBUF_SIZE];  // local kernel buffer
    644644
    645 assert( ( file_xp != XPTR_NULL ) , "file_xp == XPTR_NULL" );
     645assert( __FUNCTION__, ( file_xp != XPTR_NULL ) , "file_xp == XPTR_NULL" );
    646646
    647647#if (DEBUG_SYS_READ & 1)
     
    673673
    674674// Only TXT devices are associated to a pseudo-file
    675 assert( ( func == DEV_FUNC_TXT ) , __FUNCTION__, "illegal device func_type");
     675assert( __FUNCTION__, ( func == DEV_FUNC_TXT ) , "illegal device func_type");
    676676
    677677    // initialise number of bytes to move
     
    770770
    771771// detailed argument unused
    772 assert( (detailed == false) , "detailed argument not supported\n");
     772assert( __FUNCTION__, (detailed == false) , "detailed argument not supported\n");
    773773 
    774774    // One loop to scan the target inode xhtab containing the set of dentries
Note: See TracChangeset for help on using the changeset viewer.