Ignore:
Timestamp:
Dec 27, 2018, 7:38:58 PM (5 years ago)
Author:
alain
Message:

Fix several bugs in VFS to support the following
ksh commandis : cp, mv, rm, mkdir, cd, pwd

File:
1 edited

Legend:

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

    r602 r610  
    9393    xptr_t   unused_xp;   // required by vfs_add_child_in_parent()
    9494
    95     // creates DEVFS "dev" inode in cluster 0
     95    // create DEVFS "dev" inode in cluster 0
    9696    error = vfs_add_child_in_parent( 0,                // cxy
    9797                                     INODE_TYPE_DIR,
     
    102102                                     devfs_dev_inode_xp );
    103103
    104     assert( (error == 0) , "cannot create <dev>\n" );
     104// check success
     105assert( (error == 0) , "cannot create <dev>\n" );
    105106
    106107#if DEBUG_DEVFS_INIT
     
    149150    // create "internal" directory
    150151    snprintf( node_name , 16 , "internal_%x" , local_cxy );
     152
    151153    vfs_add_child_in_parent( local_cxy,
    152154                             INODE_TYPE_DIR,
     
    169171    {
    170172        chdev_ptr = GET_PTR( chdev_xp );
     173        chdev_cxy = GET_CXY( chdev_xp );
     174
     175assert( (chdev_cxy == local_cxy ),
     176"illegal MMC chdev_xp in cluster %x\n", local_cxy );
     177
    171178        vfs_add_child_in_parent( local_cxy,
    172179                                 INODE_TYPE_DEV,
     
    198205        {
    199206            chdev_ptr = GET_PTR( chdev_xp );
     207            chdev_cxy = GET_CXY( chdev_xp );
     208
     209assert( (chdev_cxy == local_cxy ),
     210"illegal DMA[%d] chdev_xp in cluster %x\n", channel, local_cxy );
     211
    200212            vfs_add_child_in_parent( local_cxy,
    201213                                     INODE_TYPE_DEV,
     
    226238        chdev_cxy = GET_CXY( chdev_xp );
    227239        chdev_ptr = GET_PTR( chdev_xp );
     240
    228241        if( chdev_cxy == local_cxy )
    229242        {
     
    256269        chdev_cxy = GET_CXY( chdev_xp );
    257270        chdev_ptr = GET_PTR( chdev_xp );
     271
    258272        if( chdev_cxy == local_cxy )
    259273        {
     
    288302            chdev_cxy = GET_CXY( chdev_xp );
    289303            chdev_ptr = GET_PTR( chdev_xp );
     304
    290305            if( chdev_cxy == local_cxy )
    291306            {
     
    321336            chdev_cxy = GET_CXY( chdev_xp );
    322337            chdev_ptr = GET_PTR( chdev_xp );
     338
    323339            if( chdev_cxy == local_cxy )
    324340            {
     
    354370            chdev_cxy = GET_CXY( chdev_xp );
    355371            chdev_ptr = GET_PTR( chdev_xp );
     372
    356373            if( chdev_cxy == local_cxy )
    357374            {
     
    387404            chdev_cxy = GET_CXY( chdev_xp );
    388405            chdev_ptr = GET_PTR( chdev_xp );
     406
    389407            if( chdev_cxy == local_cxy )
    390408            {
     
    419437        {
    420438            chdev_cxy = GET_CXY( chdev_xp );
    421             chdev_ptr = (chdev_t *)GET_PTR( chdev_xp );
     439            chdev_ptr = GET_PTR( chdev_xp );
     440
    422441            if( chdev_cxy == local_cxy )
    423442            {
     
    447466            chdev_cxy = GET_CXY( chdev_xp );
    448467            chdev_ptr = GET_PTR( chdev_xp );
     468
    449469            if( chdev_cxy == local_cxy )
    450470            {
Note: See TracChangeset for help on using the changeset viewer.