diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-12-21 20:12:28 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-01-22 07:52:40 +0100 |
commit | c625a641218fbda23582354b3cfc7a7c7a4e4287 (patch) | |
tree | 82853d039ebb88fb4e7afe0b572c1d072a3f4d00 /c | |
parent | powerpc: Fix AltiVec VSCR save/restore (diff) | |
download | rtems-c625a641218fbda23582354b3cfc7a7c7a4e4287.tar.bz2 |
Filesystem: Delete node type operation
Use the fstat handler instead.
Diffstat (limited to 'c')
-rw-r--r-- | c/src/lib/libbsp/shared/umon/tfsDriver.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/c/src/lib/libbsp/shared/umon/tfsDriver.c b/c/src/lib/libbsp/shared/umon/tfsDriver.c index d4b67a1a8b..43651b0c0e 100644 --- a/c/src/lib/libbsp/shared/umon/tfsDriver.c +++ b/c/src/lib/libbsp/shared/umon/tfsDriver.c @@ -597,16 +597,18 @@ static int rtems_tfs_ioctl( return(0); } -static rtems_filesystem_node_types_t rtems_tfs_node_type( - const rtems_filesystem_location_info_t *loc +static int rtems_tfs_fstat( + const rtems_filesystem_location_info_t *loc, + struct stat *buf ) { const char *path = loc->node_access; size_t pathlen = strlen(path); - return rtems_tfs_is_directory(path, pathlen) ? - RTEMS_FILESYSTEM_DIRECTORY - : RTEMS_FILESYSTEM_MEMORY_FILE; + buf->st_mode = S_IRWXU | S_IRWXG | S_IRWXO + | (rtems_tfs_is_directory(path, pathlen) ? S_IFDIR : S_IFREG); + + return 0; } static int rtems_tfs_clone_node_info( @@ -646,7 +648,6 @@ static const rtems_filesystem_operations_table rtems_tfs_ops = { .eval_path_h = rtems_tfs_eval_path, .link_h = rtems_filesystem_default_link, .are_nodes_equal_h = rtems_tfs_are_nodes_equal, - .node_type_h = rtems_tfs_node_type, .mknod_h = rtems_filesystem_default_mknod, .rmnod_h = rtems_filesystem_default_rmnod, .fchmod_h = rtems_filesystem_default_fchmod, @@ -671,7 +672,7 @@ static const rtems_filesystem_file_handlers_r rtems_tfs_handlers = { .write_h = rtems_tfs_write, .ioctl_h = rtems_tfs_ioctl, .lseek_h = rtems_tfs_lseek, - .fstat_h = rtems_filesystem_default_fstat, + .fstat_h = rtems_tfs_fstat, .ftruncate_h = rtems_tfs_ftruncate, .fsync_h = rtems_filesystem_default_fsync_or_fdatasync, .fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync, |