2000-09-28 Joel Sherrill <joel@OARcorp.com>

* libc/libio.h (rtems_filesystem_file_handlers_r,
	rtems_filesystem_operations_table): Added _h to all structure
	fields to indicate they are "handlers".
	* libc/libio_.h, libc/chdir.c, libc/chmod.c, libc/chown.c,
	libc/close.c, libc/eval.c, libc/fchdir.c, libc/fchmod.c,
	libc/fcntl.c, libc/fdatasync.c, libc/fstat.c, libc/fsync.c,
	libc/ftruncate.c, libc/getdents.c, libc/imfs_eval.c,
	libc/imfs_unlink.c, libc/ioctl.c, libc/ioman.c, libc/link.c,
	libc/lseek.c, libc/mknod.c, libc/mount.c, libc/open.c, libc/read.c,
	libc/readlink.c, libc/rmdir.c, libc/stat.c, libc/symlink.c,
	libc/unlink.c, libc/unmount.c, libc/utime.c, libc/write.c:
	Modified to reflect above name change.
This commit is contained in:
Joel Sherrill
2000-09-28 20:19:23 +00:00
parent 527b508c94
commit 9c3fa30a11
107 changed files with 417 additions and 402 deletions

View File

@@ -168,8 +168,8 @@ extern mode_t rtems_filesystem_umask;
#define rtems_filesystem_freenode( _node ) \
do { \
if ( (_node)->ops->freenod ) \
(*(_node)->ops->freenod)( (_node) ); \
if ( (_node)->ops->freenod_h ) \
(*(_node)->ops->freenod_h)( (_node) ); \
} while (0)
/*

View File

@@ -126,20 +126,20 @@ typedef int (*rtems_filesystem_rmnod_t)(
);
typedef struct {
rtems_filesystem_open_t open;
rtems_filesystem_close_t close;
rtems_filesystem_read_t read;
rtems_filesystem_write_t write;
rtems_filesystem_ioctl_t ioctl;
rtems_filesystem_lseek_t lseek;
rtems_filesystem_fstat_t fstat;
rtems_filesystem_fchmod_t fchmod;
rtems_filesystem_ftruncate_t ftruncate;
rtems_filesystem_fpathconf_t fpathconf;
rtems_filesystem_fsync_t fsync;
rtems_filesystem_fdatasync_t fdatasync;
rtems_filesystem_fcntl_t fcntl;
rtems_filesystem_rmnod_t rmnod;
rtems_filesystem_open_t open_h;
rtems_filesystem_close_t close_h;
rtems_filesystem_read_t read_h;
rtems_filesystem_write_t write_h;
rtems_filesystem_ioctl_t ioctl_h;
rtems_filesystem_lseek_t lseek_h;
rtems_filesystem_fstat_t fstat_h;
rtems_filesystem_fchmod_t fchmod_h;
rtems_filesystem_ftruncate_t ftruncate_h;
rtems_filesystem_fpathconf_t fpathconf_h;
rtems_filesystem_fsync_t fsync_h;
rtems_filesystem_fdatasync_t fdatasync_h;
rtems_filesystem_fcntl_t fcntl_h;
rtems_filesystem_rmnod_t rmnod_h;
} rtems_filesystem_file_handlers_r;
/*
@@ -249,22 +249,22 @@ typedef int (*rtems_filesystem_readlink_t)(
* File system types
*/
typedef struct {
rtems_filesystem_evalpath_t evalpath;
rtems_filesystem_evalmake_t evalformake;
rtems_filesystem_link_t link;
rtems_filesystem_unlink_t unlink;
rtems_filesystem_node_type_t node_type;
rtems_filesystem_mknod_t mknod;
rtems_filesystem_chown_t chown;
rtems_filesystem_freenode_t freenod;
rtems_filesystem_mount_t mount;
rtems_filesystem_fsmount_me_t fsmount_me;
rtems_filesystem_unmount_t unmount;
rtems_filesystem_fsunmount_me_t fsunmount_me;
rtems_filesystem_utime_t utime;
rtems_filesystem_evaluate_link_t eval_link;
rtems_filesystem_symlink_t symlink;
rtems_filesystem_readlink_t readlink;
rtems_filesystem_evalpath_t evalpath_h;
rtems_filesystem_evalmake_t evalformake_h;
rtems_filesystem_link_t link_h;
rtems_filesystem_unlink_t unlink_h;
rtems_filesystem_node_type_t node_type_h;
rtems_filesystem_mknod_t mknod_h;
rtems_filesystem_chown_t chown_h;
rtems_filesystem_freenode_t freenod_h;
rtems_filesystem_mount_t mount_h;
rtems_filesystem_fsmount_me_t fsmount_me_h;
rtems_filesystem_unmount_t unmount_h;
rtems_filesystem_fsunmount_me_t fsunmount_me_h;
rtems_filesystem_utime_t utime_h;
rtems_filesystem_evaluate_link_t eval_link_h;
rtems_filesystem_symlink_t symlink_h;
rtems_filesystem_readlink_t readlink_h;
} rtems_filesystem_operations_table;
#define IMFS_FILE_SYSTEM IMFS_ops

View File

@@ -168,8 +168,8 @@ extern mode_t rtems_filesystem_umask;
#define rtems_filesystem_freenode( _node ) \
do { \
if ( (_node)->ops->freenod ) \
(*(_node)->ops->freenod)( (_node) ); \
if ( (_node)->ops->freenod_h ) \
(*(_node)->ops->freenod_h)( (_node) ); \
} while (0)
/*

View File

@@ -37,12 +37,12 @@ int chdir(
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type ) {
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTDIR );
}

View File

@@ -38,12 +38,12 @@ int chmod(
set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod ){
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->fchmod)( &loc, mode );
result = (*loc.handlers->fchmod_h)( &loc, mode );
rtems_filesystem_freenode( &loc );

View File

@@ -31,12 +31,12 @@ int chown(
if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, TRUE ) )
return -1;
if ( !loc.ops->chown ) {
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->chown)( &loc, owner, group );
result = (*loc.ops->chown_h)( &loc, owner, group );
rtems_filesystem_freenode( &loc );

View File

@@ -25,8 +25,8 @@ int close(
rtems_libio_check_is_open(iop);
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close )
rc = (*iop->handlers->close)( iop );
if ( iop->handlers->close_h )
rc = (*iop->handlers->close_h)( iop );
rtems_libio_free( iop );

View File

@@ -43,10 +43,10 @@ int rtems_filesystem_evaluate_path(
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
if ( !pathloc->ops->evalpath )
if ( !pathloc->ops->evalpath_h )
set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->evalpath)( &pathname[i], flags, pathloc );
result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc );
/*
* Get the Node type and determine if you need to follow the link or
@@ -55,18 +55,18 @@ int rtems_filesystem_evaluate_path(
if ( (result == 0) && follow_link ) {
if ( !pathloc->ops->node_type )
if ( !pathloc->ops->node_type_h )
set_errno_and_return_minus_one( ENOTSUP );
type = (*pathloc->ops->node_type)( pathloc );
type = (*pathloc->ops->node_type_h)( pathloc );
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link )
if ( !pathloc->ops->eval_link_h )
set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->eval_link)( pathloc, flags );
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}

View File

@@ -43,11 +43,11 @@ int fchdir(
set_errno_and_return_minus_one( ENOTSUP );
}
if ( !iop->pathinfo.ops->node_type ) {
if ( !iop->pathinfo.ops->node_type_h ) {
set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*iop->pathinfo.ops->node_type)( &iop->pathinfo ) !=
if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
RTEMS_FILESYSTEM_DIRECTORY ) {
set_errno_and_return_minus_one( ENOTDIR );
}

View File

@@ -36,9 +36,9 @@ int fchmod(
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
if ( !iop->handlers->fchmod )
if ( !iop->handlers->fchmod_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->pathinfo.handlers->fchmod)( &iop->pathinfo, mode );
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
}

View File

@@ -132,8 +132,8 @@ int fcntl(
break;
}
if (ret >= 0) {
if (iop->handlers->fcntl) {
int err = (*iop->handlers->fcntl)( cmd, iop );
if (iop->handlers->fcntl_h) {
int err = (*iop->handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
ret = -1;

View File

@@ -30,8 +30,8 @@ int fdatasync(
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync )
if ( !iop->handlers->fdatasync_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync)( iop );
return (*iop->handlers->fdatasync_h)( iop );
}

View File

@@ -42,7 +42,7 @@ int fstat(
if ( !iop->handlers )
set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat )
if ( !iop->handlers->fstat_h )
set_errno_and_return_minus_one( ENOTSUP );
/*
@@ -51,7 +51,7 @@ int fstat(
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat)( &iop->pathinfo, sbuf );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
/*

View File

@@ -33,8 +33,8 @@ int fsync(
if ( !iop->handlers )
set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync )
if ( !iop->handlers->fsync_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync)( iop );
return (*iop->handlers->fsync_h)( iop );
}

View File

@@ -37,17 +37,17 @@ int ftruncate(
*/
loc = iop->pathinfo;
if ( !loc.ops->node_type )
if ( !loc.ops->node_type_h )
set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
if ( !iop->handlers->ftruncate )
if ( !iop->handlers->ftruncate_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate)( iop, length );
return (*iop->handlers->ftruncate_h)( iop, length );
}

View File

@@ -40,10 +40,10 @@ int getdents(
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
if ( !loc.ops->node_type )
if ( !loc.ops->node_type_h )
set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
set_errno_and_return_minus_one( ENOTDIR );
/*
@@ -51,8 +51,8 @@ int getdents(
* of the read attempt.
*/
if ( !iop->handlers->read )
if ( !iop->handlers->read_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read)( iop, dd_buf, dd_len );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
}

View File

@@ -44,10 +44,10 @@ int ioctl(
if ( !iop->handlers )
set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl )
if ( !iop->handlers->ioctl_h )
set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl)( iop, command, buffer );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
return rc;
}

View File

@@ -42,13 +42,13 @@ int link(
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
if ( !parent_loc.ops->evalformake ) {
if ( !parent_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake)( &new[i], &parent_loc, &name_start );
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
@@ -66,13 +66,13 @@ int link(
set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link ) {
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->link)( &existing_loc, &parent_loc, name_start );
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );

View File

@@ -49,10 +49,10 @@ off_t lseek(
return -1;
}
if ( !iop->handlers->lseek )
if ( !iop->handlers->lseek_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->lseek)( iop, offset, whence );
return (*iop->handlers->lseek_h)( iop, offset, whence );
}
/*

View File

@@ -43,12 +43,12 @@ int mknod(
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
if ( !temp_loc.ops->evalformake ) {
if ( !temp_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &temp_loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->evalformake)(
result = (*temp_loc.ops->evalformake_h)(
&pathname[i],
&temp_loc,
&name_start
@@ -56,12 +56,12 @@ int mknod(
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod ) {
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod)( name_start, mode, dev, &temp_loc );
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );

View File

@@ -151,7 +151,7 @@ int mount(
*/
loc_to_free = &loc;
if ( loc.ops->node_type( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
goto cleanup_and_bail;
}
@@ -183,12 +183,12 @@ int mount(
* below the base file system
*/
if ( !loc.ops->mount ){
if ( !loc.ops->mount_h ){
errno = ENOTSUP;
goto cleanup_and_bail;
}
if ( loc.ops->mount( temp_mt_entry ) ) {
if ( loc.ops->mount_h( temp_mt_entry ) ) {
goto cleanup_and_bail;
}
} else {
@@ -209,12 +209,12 @@ int mount(
temp_mt_entry->mt_point_node.mt_entry = NULL;
}
if ( !fs_ops->fsmount_me ) {
if ( !fs_ops->fsmount_me_h ) {
errno = ENOTSUP;
goto cleanup_and_bail;
}
if ( fs_ops->fsmount_me( temp_mt_entry ) )
if ( fs_ops->fsmount_me_h( temp_mt_entry ) )
goto cleanup_and_bail;
/*

View File

@@ -148,12 +148,12 @@ int open(
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
if ( !iop->handlers->open ) {
if ( !iop->handlers->open_h ) {
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open)( iop, pathname, flags, mode );
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
if ( rc )
goto done;

View File

@@ -33,10 +33,10 @@ ssize_t read(
* Now process the read().
*/
if ( !iop->handlers->read )
if ( !iop->handlers->read_h )
set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->read)( iop, buffer, count );
rc = (*iop->handlers->read_h)( iop, buffer, count );
if ( rc > 0 )
iop->offset += rc;

View File

@@ -29,22 +29,22 @@ int readlink(
if ( result != 0 )
return -1;
if ( !loc.ops->node_type ){
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink ){
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink)( &loc, buf, bufsize );
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );

View File

@@ -38,12 +38,12 @@ int rmdir(
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type ){
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTDIR );
}
@@ -52,12 +52,12 @@ int rmdir(
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod ){
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod)( &loc );
result = (*loc.handlers->rmnod_h)( &loc );
rtems_filesystem_freenode( &loc );

View File

@@ -57,7 +57,7 @@ int _STAT_NAME(
if ( status != 0 )
return -1;
if ( !loc.handlers->fstat ){
if ( !loc.handlers->fstat_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
@@ -69,7 +69,7 @@ int _STAT_NAME(
memset( buf, 0, sizeof(struct stat) );
status = (*loc.handlers->fstat)( &loc, buf );
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );

View File

@@ -24,16 +24,16 @@ int symlink(
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
result = (*loc.ops->evalformake)( &sympath[i], &loc, &name_start );
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
return -1;
if ( !loc.ops->symlink ) {
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->symlink)( &loc, actualpath, name_start);
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
rtems_filesystem_freenode( &loc );

View File

@@ -30,22 +30,22 @@ int unlink(
if ( result != 0 )
return -1;
if ( !loc.ops->node_type ) {
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink ) {
if ( !loc.ops->unlink_h ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink)( &loc );
result = (*loc.ops->unlink_h)( &loc );
rtems_filesystem_freenode( &loc );

View File

@@ -105,7 +105,7 @@ int unmount(
* XXX I will step off in space when evaluating past the end of the node.
*/
if ((temp_mt_entry.mt_point_node.ops->unmount )( temp_loc.mt_entry ) != 0 ) {
if ((temp_mt_entry.mt_point_node.ops->unmount_h )( temp_loc.mt_entry ) != 0 ) {
rtems_filesystem_freenode( &temp_loc );
return -1;
}
@@ -114,7 +114,7 @@ int unmount(
* Run the unmount function for the subordinate file system.
*/
if ((temp_mt_entry.mt_fs_root.ops->fsunmount_me )( temp_loc.mt_entry ) != 0){
if ((temp_mt_entry.mt_fs_root.ops->fsunmount_me_h )( temp_loc.mt_entry ) != 0){
rtems_filesystem_freenode( &temp_loc );
return -1;
}

View File

@@ -28,10 +28,10 @@ int utime(
if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, TRUE ) )
return -1;
if ( !temp_loc.ops->utime )
if ( !temp_loc.ops->utime_h )
set_errno_and_return_minus_one( ENOTSUP );
result = (*temp_loc.ops->utime)( &temp_loc, times->actime, times->modtime );
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
rtems_filesystem_freenode( &temp_loc );

View File

@@ -41,10 +41,10 @@ ssize_t write(
* Now process the write() request.
*/
if ( !iop->handlers->write )
if ( !iop->handlers->write_h )
set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->write)( iop, buffer, count );
rc = (*iop->handlers->write_h)( iop, buffer, count );
if ( rc > 0 )
iop->offset += rc;

View File

@@ -333,7 +333,7 @@ int IMFS_evaluate_for_make(
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
return (*pathloc->ops->evalformake)( &path[i-len], pathloc, name );
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
@@ -381,7 +381,7 @@ int IMFS_evaluate_for_make(
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalformake)( &path[i-len], pathloc, name );
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
/*
@@ -526,7 +526,7 @@ int IMFS_eval_path(
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
return (*pathloc->ops->evalpath)(&(pathname[i-len]),flags,pathloc);
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc);
}
} else {
@@ -578,7 +578,7 @@ int IMFS_eval_path(
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalpath)( &pathname[i-len], flags, pathloc );
return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc );
}
/*

View File

@@ -25,7 +25,7 @@ int IMFS_unlink(
{
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result;
int result = 0;
node = loc->node_access;
@@ -56,7 +56,7 @@ int IMFS_unlink(
node->info.hard_link.link_node->st_nlink --;
IMFS_update_ctime( node->info.hard_link.link_node );
if ( node->info.hard_link.link_node->st_nlink < 1) {
result = (*the_link.handlers->rmnod)( &the_link );
result = (*the_link.handlers->rmnod_h)( &the_link );
if ( result != 0 )
return -1;
}
@@ -66,7 +66,7 @@ int IMFS_unlink(
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod)( loc );
result = (*loc->handlers->rmnod_h)( loc );
return result;
}

View File

@@ -80,12 +80,12 @@ rtems_status_code rtems_io_lookup_name(
result = rtems_filesystem_evaluate_path( name, 0x00, &loc, TRUE );
the_jnode = loc.node_access;
if ( !loc.ops->node_type ) {
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type)( &loc );
node_type = (*loc.ops->node_type_h)( &loc );
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
*device_info = 0;

View File

@@ -1,4 +1,19 @@
2000-09-28 Joel Sherrill <joel@OARcorp.com>
* libc/libio.h (rtems_filesystem_file_handlers_r,
rtems_filesystem_operations_table): Added _h to all structure
fields to indicate they are "handlers".
* libc/libio_.h, libc/chdir.c, libc/chmod.c, libc/chown.c,
libc/close.c, libc/eval.c, libc/fchdir.c, libc/fchmod.c,
libc/fcntl.c, libc/fdatasync.c, libc/fstat.c, libc/fsync.c,
libc/ftruncate.c, libc/getdents.c, libc/imfs_eval.c,
libc/imfs_unlink.c, libc/ioctl.c, libc/ioman.c, libc/link.c,
libc/lseek.c, libc/mknod.c, libc/mount.c, libc/open.c, libc/read.c,
libc/readlink.c, libc/rmdir.c, libc/stat.c, libc/symlink.c,
libc/unlink.c, libc/unmount.c, libc/utime.c, libc/write.c:
Modified to reflect above name change.
2000-09-22 Joel Sherrill <joel@OARcorp.com>
* libc/newlibc.c: Removed _A29K specific ifdef.

View File

@@ -126,20 +126,20 @@ typedef int (*rtems_filesystem_rmnod_t)(
);
typedef struct {
rtems_filesystem_open_t open;
rtems_filesystem_close_t close;
rtems_filesystem_read_t read;
rtems_filesystem_write_t write;
rtems_filesystem_ioctl_t ioctl;
rtems_filesystem_lseek_t lseek;
rtems_filesystem_fstat_t fstat;
rtems_filesystem_fchmod_t fchmod;
rtems_filesystem_ftruncate_t ftruncate;
rtems_filesystem_fpathconf_t fpathconf;
rtems_filesystem_fsync_t fsync;
rtems_filesystem_fdatasync_t fdatasync;
rtems_filesystem_fcntl_t fcntl;
rtems_filesystem_rmnod_t rmnod;
rtems_filesystem_open_t open_h;
rtems_filesystem_close_t close_h;
rtems_filesystem_read_t read_h;
rtems_filesystem_write_t write_h;
rtems_filesystem_ioctl_t ioctl_h;
rtems_filesystem_lseek_t lseek_h;
rtems_filesystem_fstat_t fstat_h;
rtems_filesystem_fchmod_t fchmod_h;
rtems_filesystem_ftruncate_t ftruncate_h;
rtems_filesystem_fpathconf_t fpathconf_h;
rtems_filesystem_fsync_t fsync_h;
rtems_filesystem_fdatasync_t fdatasync_h;
rtems_filesystem_fcntl_t fcntl_h;
rtems_filesystem_rmnod_t rmnod_h;
} rtems_filesystem_file_handlers_r;
/*
@@ -249,22 +249,22 @@ typedef int (*rtems_filesystem_readlink_t)(
* File system types
*/
typedef struct {
rtems_filesystem_evalpath_t evalpath;
rtems_filesystem_evalmake_t evalformake;
rtems_filesystem_link_t link;
rtems_filesystem_unlink_t unlink;
rtems_filesystem_node_type_t node_type;
rtems_filesystem_mknod_t mknod;
rtems_filesystem_chown_t chown;
rtems_filesystem_freenode_t freenod;
rtems_filesystem_mount_t mount;
rtems_filesystem_fsmount_me_t fsmount_me;
rtems_filesystem_unmount_t unmount;
rtems_filesystem_fsunmount_me_t fsunmount_me;
rtems_filesystem_utime_t utime;
rtems_filesystem_evaluate_link_t eval_link;
rtems_filesystem_symlink_t symlink;
rtems_filesystem_readlink_t readlink;
rtems_filesystem_evalpath_t evalpath_h;
rtems_filesystem_evalmake_t evalformake_h;
rtems_filesystem_link_t link_h;
rtems_filesystem_unlink_t unlink_h;
rtems_filesystem_node_type_t node_type_h;
rtems_filesystem_mknod_t mknod_h;
rtems_filesystem_chown_t chown_h;
rtems_filesystem_freenode_t freenod_h;
rtems_filesystem_mount_t mount_h;
rtems_filesystem_fsmount_me_t fsmount_me_h;
rtems_filesystem_unmount_t unmount_h;
rtems_filesystem_fsunmount_me_t fsunmount_me_h;
rtems_filesystem_utime_t utime_h;
rtems_filesystem_evaluate_link_t eval_link_h;
rtems_filesystem_symlink_t symlink_h;
rtems_filesystem_readlink_t readlink_h;
} rtems_filesystem_operations_table;
#define IMFS_FILE_SYSTEM IMFS_ops

View File

@@ -168,8 +168,8 @@ extern mode_t rtems_filesystem_umask;
#define rtems_filesystem_freenode( _node ) \
do { \
if ( (_node)->ops->freenod ) \
(*(_node)->ops->freenod)( (_node) ); \
if ( (_node)->ops->freenod_h ) \
(*(_node)->ops->freenod_h)( (_node) ); \
} while (0)
/*

View File

@@ -37,12 +37,12 @@ int chdir(
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type ) {
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTDIR );
}

View File

@@ -38,12 +38,12 @@ int chmod(
set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod ){
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->fchmod)( &loc, mode );
result = (*loc.handlers->fchmod_h)( &loc, mode );
rtems_filesystem_freenode( &loc );

View File

@@ -31,12 +31,12 @@ int chown(
if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, TRUE ) )
return -1;
if ( !loc.ops->chown ) {
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->chown)( &loc, owner, group );
result = (*loc.ops->chown_h)( &loc, owner, group );
rtems_filesystem_freenode( &loc );

View File

@@ -25,8 +25,8 @@ int close(
rtems_libio_check_is_open(iop);
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close )
rc = (*iop->handlers->close)( iop );
if ( iop->handlers->close_h )
rc = (*iop->handlers->close_h)( iop );
rtems_libio_free( iop );

View File

@@ -43,10 +43,10 @@ int rtems_filesystem_evaluate_path(
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
if ( !pathloc->ops->evalpath )
if ( !pathloc->ops->evalpath_h )
set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->evalpath)( &pathname[i], flags, pathloc );
result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc );
/*
* Get the Node type and determine if you need to follow the link or
@@ -55,18 +55,18 @@ int rtems_filesystem_evaluate_path(
if ( (result == 0) && follow_link ) {
if ( !pathloc->ops->node_type )
if ( !pathloc->ops->node_type_h )
set_errno_and_return_minus_one( ENOTSUP );
type = (*pathloc->ops->node_type)( pathloc );
type = (*pathloc->ops->node_type_h)( pathloc );
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link )
if ( !pathloc->ops->eval_link_h )
set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->eval_link)( pathloc, flags );
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}

View File

@@ -43,11 +43,11 @@ int fchdir(
set_errno_and_return_minus_one( ENOTSUP );
}
if ( !iop->pathinfo.ops->node_type ) {
if ( !iop->pathinfo.ops->node_type_h ) {
set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*iop->pathinfo.ops->node_type)( &iop->pathinfo ) !=
if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
RTEMS_FILESYSTEM_DIRECTORY ) {
set_errno_and_return_minus_one( ENOTDIR );
}

View File

@@ -36,9 +36,9 @@ int fchmod(
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
if ( !iop->handlers->fchmod )
if ( !iop->handlers->fchmod_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->pathinfo.handlers->fchmod)( &iop->pathinfo, mode );
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
}

View File

@@ -132,8 +132,8 @@ int fcntl(
break;
}
if (ret >= 0) {
if (iop->handlers->fcntl) {
int err = (*iop->handlers->fcntl)( cmd, iop );
if (iop->handlers->fcntl_h) {
int err = (*iop->handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
ret = -1;

View File

@@ -30,8 +30,8 @@ int fdatasync(
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync )
if ( !iop->handlers->fdatasync_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync)( iop );
return (*iop->handlers->fdatasync_h)( iop );
}

View File

@@ -42,7 +42,7 @@ int fstat(
if ( !iop->handlers )
set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat )
if ( !iop->handlers->fstat_h )
set_errno_and_return_minus_one( ENOTSUP );
/*
@@ -51,7 +51,7 @@ int fstat(
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat)( &iop->pathinfo, sbuf );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
/*

View File

@@ -33,8 +33,8 @@ int fsync(
if ( !iop->handlers )
set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync )
if ( !iop->handlers->fsync_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync)( iop );
return (*iop->handlers->fsync_h)( iop );
}

View File

@@ -37,17 +37,17 @@ int ftruncate(
*/
loc = iop->pathinfo;
if ( !loc.ops->node_type )
if ( !loc.ops->node_type_h )
set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
if ( !iop->handlers->ftruncate )
if ( !iop->handlers->ftruncate_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate)( iop, length );
return (*iop->handlers->ftruncate_h)( iop, length );
}

View File

@@ -40,10 +40,10 @@ int getdents(
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
if ( !loc.ops->node_type )
if ( !loc.ops->node_type_h )
set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
set_errno_and_return_minus_one( ENOTDIR );
/*
@@ -51,8 +51,8 @@ int getdents(
* of the read attempt.
*/
if ( !iop->handlers->read )
if ( !iop->handlers->read_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read)( iop, dd_buf, dd_len );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
}

View File

@@ -333,7 +333,7 @@ int IMFS_evaluate_for_make(
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
return (*pathloc->ops->evalformake)( &path[i-len], pathloc, name );
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
@@ -381,7 +381,7 @@ int IMFS_evaluate_for_make(
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalformake)( &path[i-len], pathloc, name );
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
/*
@@ -526,7 +526,7 @@ int IMFS_eval_path(
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
return (*pathloc->ops->evalpath)(&(pathname[i-len]),flags,pathloc);
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc);
}
} else {
@@ -578,7 +578,7 @@ int IMFS_eval_path(
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalpath)( &pathname[i-len], flags, pathloc );
return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc );
}
/*

View File

@@ -25,7 +25,7 @@ int IMFS_unlink(
{
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result;
int result = 0;
node = loc->node_access;
@@ -56,7 +56,7 @@ int IMFS_unlink(
node->info.hard_link.link_node->st_nlink --;
IMFS_update_ctime( node->info.hard_link.link_node );
if ( node->info.hard_link.link_node->st_nlink < 1) {
result = (*the_link.handlers->rmnod)( &the_link );
result = (*the_link.handlers->rmnod_h)( &the_link );
if ( result != 0 )
return -1;
}
@@ -66,7 +66,7 @@ int IMFS_unlink(
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod)( loc );
result = (*loc->handlers->rmnod_h)( loc );
return result;
}

View File

@@ -44,10 +44,10 @@ int ioctl(
if ( !iop->handlers )
set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl )
if ( !iop->handlers->ioctl_h )
set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl)( iop, command, buffer );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
return rc;
}

View File

@@ -80,12 +80,12 @@ rtems_status_code rtems_io_lookup_name(
result = rtems_filesystem_evaluate_path( name, 0x00, &loc, TRUE );
the_jnode = loc.node_access;
if ( !loc.ops->node_type ) {
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type)( &loc );
node_type = (*loc.ops->node_type_h)( &loc );
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
*device_info = 0;

View File

@@ -126,20 +126,20 @@ typedef int (*rtems_filesystem_rmnod_t)(
);
typedef struct {
rtems_filesystem_open_t open;
rtems_filesystem_close_t close;
rtems_filesystem_read_t read;
rtems_filesystem_write_t write;
rtems_filesystem_ioctl_t ioctl;
rtems_filesystem_lseek_t lseek;
rtems_filesystem_fstat_t fstat;
rtems_filesystem_fchmod_t fchmod;
rtems_filesystem_ftruncate_t ftruncate;
rtems_filesystem_fpathconf_t fpathconf;
rtems_filesystem_fsync_t fsync;
rtems_filesystem_fdatasync_t fdatasync;
rtems_filesystem_fcntl_t fcntl;
rtems_filesystem_rmnod_t rmnod;
rtems_filesystem_open_t open_h;
rtems_filesystem_close_t close_h;
rtems_filesystem_read_t read_h;
rtems_filesystem_write_t write_h;
rtems_filesystem_ioctl_t ioctl_h;
rtems_filesystem_lseek_t lseek_h;
rtems_filesystem_fstat_t fstat_h;
rtems_filesystem_fchmod_t fchmod_h;
rtems_filesystem_ftruncate_t ftruncate_h;
rtems_filesystem_fpathconf_t fpathconf_h;
rtems_filesystem_fsync_t fsync_h;
rtems_filesystem_fdatasync_t fdatasync_h;
rtems_filesystem_fcntl_t fcntl_h;
rtems_filesystem_rmnod_t rmnod_h;
} rtems_filesystem_file_handlers_r;
/*
@@ -249,22 +249,22 @@ typedef int (*rtems_filesystem_readlink_t)(
* File system types
*/
typedef struct {
rtems_filesystem_evalpath_t evalpath;
rtems_filesystem_evalmake_t evalformake;
rtems_filesystem_link_t link;
rtems_filesystem_unlink_t unlink;
rtems_filesystem_node_type_t node_type;
rtems_filesystem_mknod_t mknod;
rtems_filesystem_chown_t chown;
rtems_filesystem_freenode_t freenod;
rtems_filesystem_mount_t mount;
rtems_filesystem_fsmount_me_t fsmount_me;
rtems_filesystem_unmount_t unmount;
rtems_filesystem_fsunmount_me_t fsunmount_me;
rtems_filesystem_utime_t utime;
rtems_filesystem_evaluate_link_t eval_link;
rtems_filesystem_symlink_t symlink;
rtems_filesystem_readlink_t readlink;
rtems_filesystem_evalpath_t evalpath_h;
rtems_filesystem_evalmake_t evalformake_h;
rtems_filesystem_link_t link_h;
rtems_filesystem_unlink_t unlink_h;
rtems_filesystem_node_type_t node_type_h;
rtems_filesystem_mknod_t mknod_h;
rtems_filesystem_chown_t chown_h;
rtems_filesystem_freenode_t freenod_h;
rtems_filesystem_mount_t mount_h;
rtems_filesystem_fsmount_me_t fsmount_me_h;
rtems_filesystem_unmount_t unmount_h;
rtems_filesystem_fsunmount_me_t fsunmount_me_h;
rtems_filesystem_utime_t utime_h;
rtems_filesystem_evaluate_link_t eval_link_h;
rtems_filesystem_symlink_t symlink_h;
rtems_filesystem_readlink_t readlink_h;
} rtems_filesystem_operations_table;
#define IMFS_FILE_SYSTEM IMFS_ops

View File

@@ -168,8 +168,8 @@ extern mode_t rtems_filesystem_umask;
#define rtems_filesystem_freenode( _node ) \
do { \
if ( (_node)->ops->freenod ) \
(*(_node)->ops->freenod)( (_node) ); \
if ( (_node)->ops->freenod_h ) \
(*(_node)->ops->freenod_h)( (_node) ); \
} while (0)
/*

View File

@@ -42,13 +42,13 @@ int link(
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
if ( !parent_loc.ops->evalformake ) {
if ( !parent_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake)( &new[i], &parent_loc, &name_start );
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
@@ -66,13 +66,13 @@ int link(
set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link ) {
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->link)( &existing_loc, &parent_loc, name_start );
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );

View File

@@ -49,10 +49,10 @@ off_t lseek(
return -1;
}
if ( !iop->handlers->lseek )
if ( !iop->handlers->lseek_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->lseek)( iop, offset, whence );
return (*iop->handlers->lseek_h)( iop, offset, whence );
}
/*

View File

@@ -43,12 +43,12 @@ int mknod(
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
if ( !temp_loc.ops->evalformake ) {
if ( !temp_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &temp_loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->evalformake)(
result = (*temp_loc.ops->evalformake_h)(
&pathname[i],
&temp_loc,
&name_start
@@ -56,12 +56,12 @@ int mknod(
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod ) {
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod)( name_start, mode, dev, &temp_loc );
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );

View File

@@ -151,7 +151,7 @@ int mount(
*/
loc_to_free = &loc;
if ( loc.ops->node_type( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
goto cleanup_and_bail;
}
@@ -183,12 +183,12 @@ int mount(
* below the base file system
*/
if ( !loc.ops->mount ){
if ( !loc.ops->mount_h ){
errno = ENOTSUP;
goto cleanup_and_bail;
}
if ( loc.ops->mount( temp_mt_entry ) ) {
if ( loc.ops->mount_h( temp_mt_entry ) ) {
goto cleanup_and_bail;
}
} else {
@@ -209,12 +209,12 @@ int mount(
temp_mt_entry->mt_point_node.mt_entry = NULL;
}
if ( !fs_ops->fsmount_me ) {
if ( !fs_ops->fsmount_me_h ) {
errno = ENOTSUP;
goto cleanup_and_bail;
}
if ( fs_ops->fsmount_me( temp_mt_entry ) )
if ( fs_ops->fsmount_me_h( temp_mt_entry ) )
goto cleanup_and_bail;
/*

View File

@@ -148,12 +148,12 @@ int open(
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
if ( !iop->handlers->open ) {
if ( !iop->handlers->open_h ) {
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open)( iop, pathname, flags, mode );
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
if ( rc )
goto done;

View File

@@ -33,10 +33,10 @@ ssize_t read(
* Now process the read().
*/
if ( !iop->handlers->read )
if ( !iop->handlers->read_h )
set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->read)( iop, buffer, count );
rc = (*iop->handlers->read_h)( iop, buffer, count );
if ( rc > 0 )
iop->offset += rc;

View File

@@ -29,22 +29,22 @@ int readlink(
if ( result != 0 )
return -1;
if ( !loc.ops->node_type ){
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink ){
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink)( &loc, buf, bufsize );
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );

View File

@@ -38,12 +38,12 @@ int rmdir(
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type ){
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTDIR );
}
@@ -52,12 +52,12 @@ int rmdir(
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod ){
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod)( &loc );
result = (*loc.handlers->rmnod_h)( &loc );
rtems_filesystem_freenode( &loc );

View File

@@ -57,7 +57,7 @@ int _STAT_NAME(
if ( status != 0 )
return -1;
if ( !loc.handlers->fstat ){
if ( !loc.handlers->fstat_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
@@ -69,7 +69,7 @@ int _STAT_NAME(
memset( buf, 0, sizeof(struct stat) );
status = (*loc.handlers->fstat)( &loc, buf );
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );

View File

@@ -24,16 +24,16 @@ int symlink(
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
result = (*loc.ops->evalformake)( &sympath[i], &loc, &name_start );
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
return -1;
if ( !loc.ops->symlink ) {
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->symlink)( &loc, actualpath, name_start);
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
rtems_filesystem_freenode( &loc );

View File

@@ -30,22 +30,22 @@ int unlink(
if ( result != 0 )
return -1;
if ( !loc.ops->node_type ) {
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink ) {
if ( !loc.ops->unlink_h ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink)( &loc );
result = (*loc.ops->unlink_h)( &loc );
rtems_filesystem_freenode( &loc );

View File

@@ -105,7 +105,7 @@ int unmount(
* XXX I will step off in space when evaluating past the end of the node.
*/
if ((temp_mt_entry.mt_point_node.ops->unmount )( temp_loc.mt_entry ) != 0 ) {
if ((temp_mt_entry.mt_point_node.ops->unmount_h )( temp_loc.mt_entry ) != 0 ) {
rtems_filesystem_freenode( &temp_loc );
return -1;
}
@@ -114,7 +114,7 @@ int unmount(
* Run the unmount function for the subordinate file system.
*/
if ((temp_mt_entry.mt_fs_root.ops->fsunmount_me )( temp_loc.mt_entry ) != 0){
if ((temp_mt_entry.mt_fs_root.ops->fsunmount_me_h )( temp_loc.mt_entry ) != 0){
rtems_filesystem_freenode( &temp_loc );
return -1;
}

View File

@@ -28,10 +28,10 @@ int utime(
if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, TRUE ) )
return -1;
if ( !temp_loc.ops->utime )
if ( !temp_loc.ops->utime_h )
set_errno_and_return_minus_one( ENOTSUP );
result = (*temp_loc.ops->utime)( &temp_loc, times->actime, times->modtime );
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
rtems_filesystem_freenode( &temp_loc );

View File

@@ -41,10 +41,10 @@ ssize_t write(
* Now process the write() request.
*/
if ( !iop->handlers->write )
if ( !iop->handlers->write_h )
set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->write)( iop, buffer, count );
rc = (*iop->handlers->write_h)( iop, buffer, count );
if ( rc > 0 )
iop->offset += rc;

View File

@@ -333,7 +333,7 @@ int IMFS_evaluate_for_make(
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
return (*pathloc->ops->evalformake)( &path[i-len], pathloc, name );
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
@@ -381,7 +381,7 @@ int IMFS_evaluate_for_make(
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalformake)( &path[i-len], pathloc, name );
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
/*
@@ -526,7 +526,7 @@ int IMFS_eval_path(
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
return (*pathloc->ops->evalpath)(&(pathname[i-len]),flags,pathloc);
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc);
}
} else {
@@ -578,7 +578,7 @@ int IMFS_eval_path(
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalpath)( &pathname[i-len], flags, pathloc );
return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc );
}
/*

View File

@@ -25,7 +25,7 @@ int IMFS_unlink(
{
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result;
int result = 0;
node = loc->node_access;
@@ -56,7 +56,7 @@ int IMFS_unlink(
node->info.hard_link.link_node->st_nlink --;
IMFS_update_ctime( node->info.hard_link.link_node );
if ( node->info.hard_link.link_node->st_nlink < 1) {
result = (*the_link.handlers->rmnod)( &the_link );
result = (*the_link.handlers->rmnod_h)( &the_link );
if ( result != 0 )
return -1;
}
@@ -66,7 +66,7 @@ int IMFS_unlink(
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod)( loc );
result = (*loc->handlers->rmnod_h)( loc );
return result;
}

View File

@@ -80,12 +80,12 @@ rtems_status_code rtems_io_lookup_name(
result = rtems_filesystem_evaluate_path( name, 0x00, &loc, TRUE );
the_jnode = loc.node_access;
if ( !loc.ops->node_type ) {
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type)( &loc );
node_type = (*loc.ops->node_type_h)( &loc );
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
*device_info = 0;

View File

@@ -168,8 +168,8 @@ extern mode_t rtems_filesystem_umask;
#define rtems_filesystem_freenode( _node ) \
do { \
if ( (_node)->ops->freenod ) \
(*(_node)->ops->freenod)( (_node) ); \
if ( (_node)->ops->freenod_h ) \
(*(_node)->ops->freenod_h)( (_node) ); \
} while (0)
/*

View File

@@ -126,20 +126,20 @@ typedef int (*rtems_filesystem_rmnod_t)(
);
typedef struct {
rtems_filesystem_open_t open;
rtems_filesystem_close_t close;
rtems_filesystem_read_t read;
rtems_filesystem_write_t write;
rtems_filesystem_ioctl_t ioctl;
rtems_filesystem_lseek_t lseek;
rtems_filesystem_fstat_t fstat;
rtems_filesystem_fchmod_t fchmod;
rtems_filesystem_ftruncate_t ftruncate;
rtems_filesystem_fpathconf_t fpathconf;
rtems_filesystem_fsync_t fsync;
rtems_filesystem_fdatasync_t fdatasync;
rtems_filesystem_fcntl_t fcntl;
rtems_filesystem_rmnod_t rmnod;
rtems_filesystem_open_t open_h;
rtems_filesystem_close_t close_h;
rtems_filesystem_read_t read_h;
rtems_filesystem_write_t write_h;
rtems_filesystem_ioctl_t ioctl_h;
rtems_filesystem_lseek_t lseek_h;
rtems_filesystem_fstat_t fstat_h;
rtems_filesystem_fchmod_t fchmod_h;
rtems_filesystem_ftruncate_t ftruncate_h;
rtems_filesystem_fpathconf_t fpathconf_h;
rtems_filesystem_fsync_t fsync_h;
rtems_filesystem_fdatasync_t fdatasync_h;
rtems_filesystem_fcntl_t fcntl_h;
rtems_filesystem_rmnod_t rmnod_h;
} rtems_filesystem_file_handlers_r;
/*
@@ -249,22 +249,22 @@ typedef int (*rtems_filesystem_readlink_t)(
* File system types
*/
typedef struct {
rtems_filesystem_evalpath_t evalpath;
rtems_filesystem_evalmake_t evalformake;
rtems_filesystem_link_t link;
rtems_filesystem_unlink_t unlink;
rtems_filesystem_node_type_t node_type;
rtems_filesystem_mknod_t mknod;
rtems_filesystem_chown_t chown;
rtems_filesystem_freenode_t freenod;
rtems_filesystem_mount_t mount;
rtems_filesystem_fsmount_me_t fsmount_me;
rtems_filesystem_unmount_t unmount;
rtems_filesystem_fsunmount_me_t fsunmount_me;
rtems_filesystem_utime_t utime;
rtems_filesystem_evaluate_link_t eval_link;
rtems_filesystem_symlink_t symlink;
rtems_filesystem_readlink_t readlink;
rtems_filesystem_evalpath_t evalpath_h;
rtems_filesystem_evalmake_t evalformake_h;
rtems_filesystem_link_t link_h;
rtems_filesystem_unlink_t unlink_h;
rtems_filesystem_node_type_t node_type_h;
rtems_filesystem_mknod_t mknod_h;
rtems_filesystem_chown_t chown_h;
rtems_filesystem_freenode_t freenod_h;
rtems_filesystem_mount_t mount_h;
rtems_filesystem_fsmount_me_t fsmount_me_h;
rtems_filesystem_unmount_t unmount_h;
rtems_filesystem_fsunmount_me_t fsunmount_me_h;
rtems_filesystem_utime_t utime_h;
rtems_filesystem_evaluate_link_t eval_link_h;
rtems_filesystem_symlink_t symlink_h;
rtems_filesystem_readlink_t readlink_h;
} rtems_filesystem_operations_table;
#define IMFS_FILE_SYSTEM IMFS_ops

View File

@@ -168,8 +168,8 @@ extern mode_t rtems_filesystem_umask;
#define rtems_filesystem_freenode( _node ) \
do { \
if ( (_node)->ops->freenod ) \
(*(_node)->ops->freenod)( (_node) ); \
if ( (_node)->ops->freenod_h ) \
(*(_node)->ops->freenod_h)( (_node) ); \
} while (0)
/*

View File

@@ -37,12 +37,12 @@ int chdir(
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type ) {
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTDIR );
}

View File

@@ -38,12 +38,12 @@ int chmod(
set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod ){
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->fchmod)( &loc, mode );
result = (*loc.handlers->fchmod_h)( &loc, mode );
rtems_filesystem_freenode( &loc );

View File

@@ -31,12 +31,12 @@ int chown(
if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, TRUE ) )
return -1;
if ( !loc.ops->chown ) {
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->chown)( &loc, owner, group );
result = (*loc.ops->chown_h)( &loc, owner, group );
rtems_filesystem_freenode( &loc );

View File

@@ -25,8 +25,8 @@ int close(
rtems_libio_check_is_open(iop);
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close )
rc = (*iop->handlers->close)( iop );
if ( iop->handlers->close_h )
rc = (*iop->handlers->close_h)( iop );
rtems_libio_free( iop );

View File

@@ -43,10 +43,10 @@ int rtems_filesystem_evaluate_path(
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
if ( !pathloc->ops->evalpath )
if ( !pathloc->ops->evalpath_h )
set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->evalpath)( &pathname[i], flags, pathloc );
result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc );
/*
* Get the Node type and determine if you need to follow the link or
@@ -55,18 +55,18 @@ int rtems_filesystem_evaluate_path(
if ( (result == 0) && follow_link ) {
if ( !pathloc->ops->node_type )
if ( !pathloc->ops->node_type_h )
set_errno_and_return_minus_one( ENOTSUP );
type = (*pathloc->ops->node_type)( pathloc );
type = (*pathloc->ops->node_type_h)( pathloc );
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link )
if ( !pathloc->ops->eval_link_h )
set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->eval_link)( pathloc, flags );
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}

View File

@@ -43,11 +43,11 @@ int fchdir(
set_errno_and_return_minus_one( ENOTSUP );
}
if ( !iop->pathinfo.ops->node_type ) {
if ( !iop->pathinfo.ops->node_type_h ) {
set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*iop->pathinfo.ops->node_type)( &iop->pathinfo ) !=
if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
RTEMS_FILESYSTEM_DIRECTORY ) {
set_errno_and_return_minus_one( ENOTDIR );
}

View File

@@ -36,9 +36,9 @@ int fchmod(
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
if ( !iop->handlers->fchmod )
if ( !iop->handlers->fchmod_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->pathinfo.handlers->fchmod)( &iop->pathinfo, mode );
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
}

View File

@@ -132,8 +132,8 @@ int fcntl(
break;
}
if (ret >= 0) {
if (iop->handlers->fcntl) {
int err = (*iop->handlers->fcntl)( cmd, iop );
if (iop->handlers->fcntl_h) {
int err = (*iop->handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
ret = -1;

View File

@@ -30,8 +30,8 @@ int fdatasync(
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync )
if ( !iop->handlers->fdatasync_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync)( iop );
return (*iop->handlers->fdatasync_h)( iop );
}

View File

@@ -42,7 +42,7 @@ int fstat(
if ( !iop->handlers )
set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat )
if ( !iop->handlers->fstat_h )
set_errno_and_return_minus_one( ENOTSUP );
/*
@@ -51,7 +51,7 @@ int fstat(
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat)( &iop->pathinfo, sbuf );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
/*

View File

@@ -33,8 +33,8 @@ int fsync(
if ( !iop->handlers )
set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync )
if ( !iop->handlers->fsync_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync)( iop );
return (*iop->handlers->fsync_h)( iop );
}

View File

@@ -37,17 +37,17 @@ int ftruncate(
*/
loc = iop->pathinfo;
if ( !loc.ops->node_type )
if ( !loc.ops->node_type_h )
set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
if ( !iop->handlers->ftruncate )
if ( !iop->handlers->ftruncate_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate)( iop, length );
return (*iop->handlers->ftruncate_h)( iop, length );
}

View File

@@ -40,10 +40,10 @@ int getdents(
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
if ( !loc.ops->node_type )
if ( !loc.ops->node_type_h )
set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
set_errno_and_return_minus_one( ENOTDIR );
/*
@@ -51,8 +51,8 @@ int getdents(
* of the read attempt.
*/
if ( !iop->handlers->read )
if ( !iop->handlers->read_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read)( iop, dd_buf, dd_len );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
}

View File

@@ -44,10 +44,10 @@ int ioctl(
if ( !iop->handlers )
set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl )
if ( !iop->handlers->ioctl_h )
set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl)( iop, command, buffer );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
return rc;
}

View File

@@ -42,13 +42,13 @@ int link(
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
if ( !parent_loc.ops->evalformake ) {
if ( !parent_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake)( &new[i], &parent_loc, &name_start );
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
@@ -66,13 +66,13 @@ int link(
set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link ) {
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->link)( &existing_loc, &parent_loc, name_start );
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );

View File

@@ -49,10 +49,10 @@ off_t lseek(
return -1;
}
if ( !iop->handlers->lseek )
if ( !iop->handlers->lseek_h )
set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->lseek)( iop, offset, whence );
return (*iop->handlers->lseek_h)( iop, offset, whence );
}
/*

View File

@@ -43,12 +43,12 @@ int mknod(
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
if ( !temp_loc.ops->evalformake ) {
if ( !temp_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &temp_loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->evalformake)(
result = (*temp_loc.ops->evalformake_h)(
&pathname[i],
&temp_loc,
&name_start
@@ -56,12 +56,12 @@ int mknod(
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod ) {
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod)( name_start, mode, dev, &temp_loc );
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );

View File

@@ -151,7 +151,7 @@ int mount(
*/
loc_to_free = &loc;
if ( loc.ops->node_type( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
goto cleanup_and_bail;
}
@@ -183,12 +183,12 @@ int mount(
* below the base file system
*/
if ( !loc.ops->mount ){
if ( !loc.ops->mount_h ){
errno = ENOTSUP;
goto cleanup_and_bail;
}
if ( loc.ops->mount( temp_mt_entry ) ) {
if ( loc.ops->mount_h( temp_mt_entry ) ) {
goto cleanup_and_bail;
}
} else {
@@ -209,12 +209,12 @@ int mount(
temp_mt_entry->mt_point_node.mt_entry = NULL;
}
if ( !fs_ops->fsmount_me ) {
if ( !fs_ops->fsmount_me_h ) {
errno = ENOTSUP;
goto cleanup_and_bail;
}
if ( fs_ops->fsmount_me( temp_mt_entry ) )
if ( fs_ops->fsmount_me_h( temp_mt_entry ) )
goto cleanup_and_bail;
/*

View File

@@ -148,12 +148,12 @@ int open(
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
if ( !iop->handlers->open ) {
if ( !iop->handlers->open_h ) {
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open)( iop, pathname, flags, mode );
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
if ( rc )
goto done;

View File

@@ -33,10 +33,10 @@ ssize_t read(
* Now process the read().
*/
if ( !iop->handlers->read )
if ( !iop->handlers->read_h )
set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->read)( iop, buffer, count );
rc = (*iop->handlers->read_h)( iop, buffer, count );
if ( rc > 0 )
iop->offset += rc;

View File

@@ -29,22 +29,22 @@ int readlink(
if ( result != 0 )
return -1;
if ( !loc.ops->node_type ){
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink ){
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink)( &loc, buf, bufsize );
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );

View File

@@ -38,12 +38,12 @@ int rmdir(
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type ){
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTDIR );
}
@@ -52,12 +52,12 @@ int rmdir(
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod ){
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod)( &loc );
result = (*loc.handlers->rmnod_h)( &loc );
rtems_filesystem_freenode( &loc );

View File

@@ -57,7 +57,7 @@ int _STAT_NAME(
if ( status != 0 )
return -1;
if ( !loc.handlers->fstat ){
if ( !loc.handlers->fstat_h ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
@@ -69,7 +69,7 @@ int _STAT_NAME(
memset( buf, 0, sizeof(struct stat) );
status = (*loc.handlers->fstat)( &loc, buf );
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );

View File

@@ -24,16 +24,16 @@ int symlink(
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
result = (*loc.ops->evalformake)( &sympath[i], &loc, &name_start );
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
return -1;
if ( !loc.ops->symlink ) {
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->symlink)( &loc, actualpath, name_start);
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
rtems_filesystem_freenode( &loc );

Some files were not shown because too many files have changed in this diff Show More