summaryrefslogtreecommitdiffstats
path: root/c/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib')
-rw-r--r--c/src/lib/include/rtems/libio.h10
-rw-r--r--c/src/lib/libc/imfs_handlers_device.c3
-rw-r--r--c/src/lib/libc/imfs_handlers_directory.c11
-rw-r--r--c/src/lib/libc/imfs_handlers_memfile.c3
-rw-r--r--c/src/lib/libc/imfs_init.c1
-rw-r--r--c/src/lib/libc/libio.h10
-rw-r--r--c/src/lib/libc/rmdir.c4
7 files changed, 26 insertions, 16 deletions
diff --git a/c/src/lib/include/rtems/libio.h b/c/src/lib/include/rtems/libio.h
index c4e54c4132..5d71866164 100644
--- a/c/src/lib/include/rtems/libio.h
+++ b/c/src/lib/include/rtems/libio.h
@@ -121,6 +121,10 @@ typedef int (*rtems_filesystem_fcntl_t)(
rtems_libio_t *iop
);
+typedef int (*rtems_filesystem_rmnod_t)(
+ rtems_filesystem_location_info_t *pathloc /* IN */
+);
+
typedef struct {
rtems_filesystem_open_t open;
rtems_filesystem_close_t close;
@@ -135,6 +139,7 @@ typedef struct {
rtems_filesystem_fsync_t fsync;
rtems_filesystem_fdatasync_t fdatasync;
rtems_filesystem_fcntl_t fcntl;
+ rtems_filesystem_rmnod_t rmnod;
} rtems_filesystem_file_handlers_r;
/*
@@ -193,10 +198,6 @@ typedef int (*rtems_filesystem_freenode_t)(
rtems_filesystem_location_info_t *pathloc /* IN */
);
-typedef int (*rtems_filesystem_rmnod_t)(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
typedef int (* rtems_filesystem_mount_t ) (
rtems_filesystem_mount_table_entry_t *mt_entry /* in */
);
@@ -254,7 +255,6 @@ typedef struct {
rtems_filesystem_unlink_t unlink;
rtems_filesystem_node_type_t node_type;
rtems_filesystem_mknod_t mknod;
- rtems_filesystem_rmnod_t rmnod;
rtems_filesystem_chown_t chown;
rtems_filesystem_freenode_t freenod;
rtems_filesystem_mount_t mount;
diff --git a/c/src/lib/libc/imfs_handlers_device.c b/c/src/lib/libc/imfs_handlers_device.c
index 38a6aca7d4..b6b9c808a0 100644
--- a/c/src/lib/libc/imfs_handlers_device.c
+++ b/c/src/lib/libc/imfs_handlers_device.c
@@ -33,5 +33,6 @@ rtems_filesystem_file_handlers_r IMFS_device_handlers = {
NULL, /* fpathconf */
NULL, /* fsync */
NULL, /* fdatasync */
- NULL /* fcntl */
+ NULL, /* fcntl */
+ IMFS_rmnod
};
diff --git a/c/src/lib/libc/imfs_handlers_directory.c b/c/src/lib/libc/imfs_handlers_directory.c
index 9f4e6a0e24..364f3cdf26 100644
--- a/c/src/lib/libc/imfs_handlers_directory.c
+++ b/c/src/lib/libc/imfs_handlers_directory.c
@@ -33,5 +33,14 @@ rtems_filesystem_file_handlers_r IMFS_directory_handlers = {
NULL, /* fpathconf */
NULL, /* fsync */
IMFS_fdatasync,
- IMFS_fcntl
+ IMFS_fcntl,
+ IMFS_rmnod
};
+
+
+
+
+
+
+
+
diff --git a/c/src/lib/libc/imfs_handlers_memfile.c b/c/src/lib/libc/imfs_handlers_memfile.c
index 1e373b4745..f622c99558 100644
--- a/c/src/lib/libc/imfs_handlers_memfile.c
+++ b/c/src/lib/libc/imfs_handlers_memfile.c
@@ -33,5 +33,6 @@ rtems_filesystem_file_handlers_r IMFS_memfile_handlers = {
NULL, /* fpathconf */
NULL, /* fsync */
IMFS_fdatasync,
- IMFS_fcntl
+ IMFS_fcntl,
+ IMFS_rmnod
};
diff --git a/c/src/lib/libc/imfs_init.c b/c/src/lib/libc/imfs_init.c
index 8f44a4e2cd..ad2781f63e 100644
--- a/c/src/lib/libc/imfs_init.c
+++ b/c/src/lib/libc/imfs_init.c
@@ -37,7 +37,6 @@ rtems_filesystem_operations_table IMFS_ops = {
IMFS_unlink,
IMFS_node_type,
IMFS_mknod,
- IMFS_rmnod,
IMFS_chown,
IMFS_freenodinfo,
IMFS_mount,
diff --git a/c/src/lib/libc/libio.h b/c/src/lib/libc/libio.h
index c4e54c4132..5d71866164 100644
--- a/c/src/lib/libc/libio.h
+++ b/c/src/lib/libc/libio.h
@@ -121,6 +121,10 @@ typedef int (*rtems_filesystem_fcntl_t)(
rtems_libio_t *iop
);
+typedef int (*rtems_filesystem_rmnod_t)(
+ rtems_filesystem_location_info_t *pathloc /* IN */
+);
+
typedef struct {
rtems_filesystem_open_t open;
rtems_filesystem_close_t close;
@@ -135,6 +139,7 @@ typedef struct {
rtems_filesystem_fsync_t fsync;
rtems_filesystem_fdatasync_t fdatasync;
rtems_filesystem_fcntl_t fcntl;
+ rtems_filesystem_rmnod_t rmnod;
} rtems_filesystem_file_handlers_r;
/*
@@ -193,10 +198,6 @@ typedef int (*rtems_filesystem_freenode_t)(
rtems_filesystem_location_info_t *pathloc /* IN */
);
-typedef int (*rtems_filesystem_rmnod_t)(
- rtems_filesystem_location_info_t *pathloc /* IN */
-);
-
typedef int (* rtems_filesystem_mount_t ) (
rtems_filesystem_mount_table_entry_t *mt_entry /* in */
);
@@ -254,7 +255,6 @@ typedef struct {
rtems_filesystem_unlink_t unlink;
rtems_filesystem_node_type_t node_type;
rtems_filesystem_mknod_t mknod;
- rtems_filesystem_rmnod_t rmnod;
rtems_filesystem_chown_t chown;
rtems_filesystem_freenode_t freenod;
rtems_filesystem_mount_t mount;
diff --git a/c/src/lib/libc/rmdir.c b/c/src/lib/libc/rmdir.c
index 806176beaf..001d999ce2 100644
--- a/c/src/lib/libc/rmdir.c
+++ b/c/src/lib/libc/rmdir.c
@@ -53,12 +53,12 @@ int rmdir(
* Use the filesystems rmnod to remove the node.
*/
- if ( !loc.ops->rmnod ){
+ if ( !loc.handlers->rmnod ){
rtems_filesystem_freenode( &loc );
set_errno_and_return_minus_one( ENOTSUP );
}
- result = (*loc.ops->rmnod)( &loc );
+ result = (*loc.handlers->rmnod)( &loc );
rtems_filesystem_freenode( &loc );