summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-12-21 20:12:28 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-01-22 07:52:40 +0100
commitc625a641218fbda23582354b3cfc7a7c7a4e4287 (patch)
tree82853d039ebb88fb4e7afe0b572c1d072a3f4d00 /cpukit/libnetworking
parentpowerpc: Fix AltiVec VSCR save/restore (diff)
downloadrtems-c625a641218fbda23582354b3cfc7a7c7a4e4287.tar.bz2
Filesystem: Delete node type operation
Use the fstat handler instead.
Diffstat (limited to 'cpukit/libnetworking')
-rw-r--r--cpukit/libnetworking/lib/ftpfs.c8
-rw-r--r--cpukit/libnetworking/lib/tftpDriver.c15
2 files changed, 8 insertions, 15 deletions
diff --git a/cpukit/libnetworking/lib/ftpfs.c b/cpukit/libnetworking/lib/ftpfs.c
index 9a4fd86787..9a13c8e98c 100644
--- a/cpukit/libnetworking/lib/ftpfs.c
+++ b/cpukit/libnetworking/lib/ftpfs.c
@@ -1260,13 +1260,6 @@ static void rtems_ftpfs_free_node(const rtems_filesystem_location_info_t *loc)
}
}
-static rtems_filesystem_node_types_t rtems_ftpfs_node_type(
- const rtems_filesystem_location_info_t *loc
-)
-{
- return RTEMS_FILESYSTEM_MEMORY_FILE;
-}
-
int rtems_ftpfs_initialize(
rtems_filesystem_mount_table_entry_t *e,
const void *d
@@ -1383,7 +1376,6 @@ static const rtems_filesystem_operations_table rtems_ftpfs_ops = {
.eval_path_h = rtems_ftpfs_eval_path,
.link_h = rtems_filesystem_default_link,
.are_nodes_equal_h = rtems_filesystem_default_are_nodes_equal,
- .node_type_h = rtems_ftpfs_node_type,
.mknod_h = rtems_filesystem_default_mknod,
.rmnod_h = rtems_filesystem_default_rmnod,
.fchmod_h = rtems_filesystem_default_fchmod,
diff --git a/cpukit/libnetworking/lib/tftpDriver.c b/cpukit/libnetworking/lib/tftpDriver.c
index 414012a1ec..b114a498d9 100644
--- a/cpukit/libnetworking/lib/tftpDriver.c
+++ b/cpukit/libnetworking/lib/tftpDriver.c
@@ -973,16 +973,18 @@ static int rtems_tftp_ftruncate(
return 0;
}
-static rtems_filesystem_node_types_t rtems_tftp_node_type(
- const rtems_filesystem_location_info_t *loc
+static int rtems_tftp_fstat(
+ const rtems_filesystem_location_info_t *loc,
+ struct stat *buf
)
{
const char *path = loc->node_access;
size_t pathlen = strlen (path);
- return rtems_tftp_is_directory (path, pathlen) ?
- RTEMS_FILESYSTEM_DIRECTORY
- : RTEMS_FILESYSTEM_MEMORY_FILE;
+ buf->st_mode = S_IRWXU | S_IRWXG | S_IRWXO
+ | (rtems_tftp_is_directory (path, pathlen) ? S_IFDIR : S_IFREG);
+
+ return 0;
}
static int rtems_tftp_clone(
@@ -1022,7 +1024,6 @@ static const rtems_filesystem_operations_table rtems_tftp_ops = {
.eval_path_h = rtems_tftp_eval_path,
.link_h = rtems_filesystem_default_link,
.are_nodes_equal_h = rtems_tftp_are_nodes_equal,
- .node_type_h = rtems_tftp_node_type,
.mknod_h = rtems_filesystem_default_mknod,
.rmnod_h = rtems_filesystem_default_rmnod,
.fchmod_h = rtems_filesystem_default_fchmod,
@@ -1047,7 +1048,7 @@ static const rtems_filesystem_file_handlers_r rtems_tftp_handlers = {
.write_h = rtems_tftp_write,
.ioctl_h = rtems_filesystem_default_ioctl,
.lseek_h = rtems_filesystem_default_lseek,
- .fstat_h = rtems_filesystem_default_fstat,
+ .fstat_h = rtems_tftp_fstat,
.ftruncate_h = rtems_tftp_ftruncate,
.fsync_h = rtems_filesystem_default_fsync_or_fdatasync,
.fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,