/* * memfile_read * * This routine processes the read() system call. */ ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; return IMFS_memfile_read( the_jnode, iop->offset, buffer, count ); }
static ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { IMFS_file_t *file = IMFS_iop_to_file( iop ); ssize_t status; status = IMFS_memfile_read( file, iop->offset, buffer, count ); if ( status > 0 ) iop->offset += status; return status; }
ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { IMFS_jnode_t *the_jnode; ssize_t status; the_jnode = iop->pathinfo.node_access; status = IMFS_memfile_read( the_jnode, iop->offset, buffer, count ); if ( status > 0 ) iop->offset += status; return status; }