summaryrefslogtreecommitdiffstats
path: root/c/src/exec/libfs/src
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-08-11 20:04:27 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-08-11 20:04:27 +0000
commitdd19c0bb061af5595a970ed3c4f4af3824b65593 (patch)
treef946b796fc8e82900702a771e6f6c6b39cbe2297 /c/src/exec/libfs/src
parent2000-08-11 Charles-Antoine Gauthier <charles.gauthier@nrc.ca> (diff)
downloadrtems-dd19c0bb061af5595a970ed3c4f4af3824b65593.tar.bz2
2000-08-11 Chris Johns <ccj@acm.org>
* libc/chmod.c: Return ENOTSUP if filesystem does not have handler. * libc/eval.c: Ditto. * libc/fcntl.c: Ditto. * libc/fsync.c: Ditto. * libc/ioctl.c: Ditto. * libc/ioman.c: Ditto. * libc/link.c: Ditto. * libc/memfile.c: Ditto. * libc/mknod.c: Ditto. * libc/symlink.c: Ditto. * libc/libio.h(rtems_filesystem_dev_major_t): New macro. * libc/libio.h(rtems_filesystem_dev_minor_t): New macro.
Diffstat (limited to 'c/src/exec/libfs/src')
-rw-r--r--c/src/exec/libfs/src/imfs/ioman.c5
-rw-r--r--c/src/exec/libfs/src/imfs/memfile.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/c/src/exec/libfs/src/imfs/ioman.c b/c/src/exec/libfs/src/imfs/ioman.c
index ee22791657..4f592a6094 100644
--- a/c/src/exec/libfs/src/imfs/ioman.c
+++ b/c/src/exec/libfs/src/imfs/ioman.c
@@ -80,6 +80,11 @@ 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 ) {
+ rtems_filesystem_freenode( &loc );
+ set_errno_and_return_minus_one( ENOTSUP );
+ }
+
node_type = (*loc.ops->node_type)( &loc );
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
diff --git a/c/src/exec/libfs/src/imfs/memfile.c b/c/src/exec/libfs/src/imfs/memfile.c
index a2dc695044..9974a3d2d5 100644
--- a/c/src/exec/libfs/src/imfs/memfile.c
+++ b/c/src/exec/libfs/src/imfs/memfile.c
@@ -112,6 +112,9 @@ int memfile_close(
the_jnode = iop->file_info;
+ if (iop->flags & LIBIO_FLAGS_APPEND)
+ iop->offset = the_jnode->info.file.size;
+
return 0;
}
@@ -340,7 +343,6 @@ MEMFILE_STATIC int IMFS_memfile_addblock(
#endif
memory = memfile_alloc_block();
- assert( memory );
if ( !memory )
return 1;
*block_entry_ptr = memory;