This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

about ramfs.cxx


Hi,now i am reading ramfs.cxx.
In function findbuffer_indirect1 some lines as followed:
      int bi = pos / RAMFS_INDIRECT1_BLOCK_EXTENT;
      int bpos = pos % RAMFS_INDIRECT1_BLOCK_EXTENT;
      int err;
      cyg_uint8 *b;
      size_t sz;
 
    // Use findbuffer_direct() to index and allocate
    // the first level indirect block.
   
    err = findbuffer_direct( bi,   
                                    (ramfs_block **)blocks,
                                    nblocks,
                                    &b,
                                    &sz,
                                    alloc);
i don't know why findbuffer_direct's first parameter is bi but not bi*CYGNUM_RAMFS_BLOCK_SIZE.
     Thanks.
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]