summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-01-04 18:30:58 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-01-04 18:30:58 +0000
commitb2709481ece1ccb8aa43b099d3a8e859a4cf68f6 (patch)
tree4c607208074cec24d060eb22431f9cc5e2165858 /cpukit
parenta02224e0e646c750c3fbd477d9d20e8560f06d3b (diff)
downloadrtems-b2709481ece1ccb8aa43b099d3a8e859a4cf68f6.tar.bz2
2002-01-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* src/imfs/imfs_eval.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one. * src/imfs/memfile.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one. * src/imfs/imfs_readlink.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one. * src/imfs/imfs_unlink.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one. * src/imfs/imfs_link.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one. * src/imfs/imfs_chown.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one. * src/imfs/ioman.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one. * src/imfs/imfs_mount.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one. * src/imfs/imfs_directory.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one. * src/imfs/imfs_stat.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one. * src/imfs/imfs_fchmod.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one. * src/imfs/imfs_symlink.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one. * src/imfs/imfs_mknod.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one. * src/imfs/linearfile.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one. * src/imfs/imfs_unmount.c: Include <rtems/seterr.h>. Apply rtems_set_errno_and_return_minus_one. * src/imfs/imfs.h: Apply rtems_set_errno_and_return_minus_one. Comment out increment_and_check_linkcounts.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libfs/ChangeLog35
-rw-r--r--cpukit/libfs/src/imfs/imfs.h5
-rw-r--r--cpukit/libfs/src/imfs/imfs_chown.c3
-rw-r--r--cpukit/libfs/src/imfs/imfs_directory.c9
-rw-r--r--cpukit/libfs/src/imfs/imfs_eval.c47
-rw-r--r--cpukit/libfs/src/imfs/imfs_fchmod.c5
-rw-r--r--cpukit/libfs/src/imfs/imfs_link.c5
-rw-r--r--cpukit/libfs/src/imfs/imfs_mknod.c5
-rw-r--r--cpukit/libfs/src/imfs/imfs_mount.c3
-rw-r--r--cpukit/libfs/src/imfs/imfs_readlink.c3
-rw-r--r--cpukit/libfs/src/imfs/imfs_stat.c3
-rw-r--r--cpukit/libfs/src/imfs/imfs_symlink.c3
-rw-r--r--cpukit/libfs/src/imfs/imfs_unlink.c3
-rw-r--r--cpukit/libfs/src/imfs/imfs_unmount.c5
-rw-r--r--cpukit/libfs/src/imfs/ioman.c3
-rw-r--r--cpukit/libfs/src/imfs/linearfile.c7
-rw-r--r--cpukit/libfs/src/imfs/memfile.c37
17 files changed, 117 insertions, 64 deletions
diff --git a/cpukit/libfs/ChangeLog b/cpukit/libfs/ChangeLog
index a901494793..d05c0c7e9d 100644
--- a/cpukit/libfs/ChangeLog
+++ b/cpukit/libfs/ChangeLog
@@ -1,3 +1,38 @@
+2002-01-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * src/imfs/imfs_eval.c: Include <rtems/seterr.h>.
+ Apply rtems_set_errno_and_return_minus_one.
+ * src/imfs/memfile.c: Include <rtems/seterr.h>.
+ Apply rtems_set_errno_and_return_minus_one.
+ * src/imfs/imfs_readlink.c: Include <rtems/seterr.h>.
+ Apply rtems_set_errno_and_return_minus_one.
+ * src/imfs/imfs_unlink.c: Include <rtems/seterr.h>.
+ Apply rtems_set_errno_and_return_minus_one.
+ * src/imfs/imfs_link.c: Include <rtems/seterr.h>.
+ Apply rtems_set_errno_and_return_minus_one.
+ * src/imfs/imfs_chown.c: Include <rtems/seterr.h>.
+ Apply rtems_set_errno_and_return_minus_one.
+ * src/imfs/ioman.c: Include <rtems/seterr.h>.
+ Apply rtems_set_errno_and_return_minus_one.
+ * src/imfs/imfs_mount.c: Include <rtems/seterr.h>.
+ Apply rtems_set_errno_and_return_minus_one.
+ * src/imfs/imfs_directory.c: Include <rtems/seterr.h>.
+ Apply rtems_set_errno_and_return_minus_one.
+ * src/imfs/imfs_stat.c: Include <rtems/seterr.h>.
+ Apply rtems_set_errno_and_return_minus_one.
+ * src/imfs/imfs_fchmod.c: Include <rtems/seterr.h>.
+ Apply rtems_set_errno_and_return_minus_one.
+ * src/imfs/imfs_symlink.c: Include <rtems/seterr.h>.
+ Apply rtems_set_errno_and_return_minus_one.
+ * src/imfs/imfs_mknod.c: Include <rtems/seterr.h>.
+ Apply rtems_set_errno_and_return_minus_one.
+ * src/imfs/linearfile.c: Include <rtems/seterr.h>.
+ Apply rtems_set_errno_and_return_minus_one.
+ * src/imfs/imfs_unmount.c: Include <rtems/seterr.h>.
+ Apply rtems_set_errno_and_return_minus_one.
+ * src/imfs/imfs.h: Apply rtems_set_errno_and_return_minus_one.
+ Comment out increment_and_check_linkcounts.
+
2001-11-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* wrapup/Makefile.am: Remove HAS_IMFS.
diff --git a/cpukit/libfs/src/imfs/imfs.h b/cpukit/libfs/src/imfs/imfs.h
index ad18284d93..4113553768 100644
--- a/cpukit/libfs/src/imfs/imfs.h
+++ b/cpukit/libfs/src/imfs/imfs.h
@@ -207,10 +207,13 @@ typedef struct {
rtems_filesystem_file_handlers_r *directory_handlers;
} IMFS_fs_info_t;
+#if UNUSED
+/* FIXME: Unused, we might want to remove it */
#define increment_and_check_linkcounts( _fs_info ) \
((IMFS_fs_info_t * )_fs_info)->link_counts++; \
if ( ((IMFS_fs_info_t * )_fs_info)->link_counts > MAXSYMLINKS ) \
- set_errno_and_return_minus_one( ELOOP )
+ rtems_set_errno_and_return_minus_one( ELOOP )
+#endif
#define decrement_linkcounts( _fs_info ) \
((IMFS_fs_info_t * )_fs_info)->link_counts--;
diff --git a/cpukit/libfs/src/imfs/imfs_chown.c b/cpukit/libfs/src/imfs/imfs_chown.c
index 52f16951c6..2db58052ee 100644
--- a/cpukit/libfs/src/imfs/imfs_chown.c
+++ b/cpukit/libfs/src/imfs/imfs_chown.c
@@ -20,6 +20,7 @@
#include <errno.h>
#include <rtems/libio_.h>
+#include <rtems/seterr.h>
#include "imfs.h"
int IMFS_chown(
@@ -43,7 +44,7 @@ int IMFS_chown(
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
- set_errno_and_return_minus_one( EPERM );
+ rtems_set_errno_and_return_minus_one( EPERM );
#endif
jnode->st_uid = owner;
diff --git a/cpukit/libfs/src/imfs/imfs_directory.c b/cpukit/libfs/src/imfs/imfs_directory.c
index 9df4543909..dec1e0ec2d 100644
--- a/cpukit/libfs/src/imfs/imfs_directory.c
+++ b/cpukit/libfs/src/imfs/imfs_directory.c
@@ -28,6 +28,7 @@
#include "imfs.h"
#include <rtems/libio_.h>
+#include <rtems/seterr.h>
/*
* imfs_dir_open
@@ -197,7 +198,7 @@ int imfs_dir_lseek(
case SEEK_END: /* Movement past the end of the directory via lseek */
/* is not a permitted operation */
default:
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
@@ -293,21 +294,21 @@ int imfs_dir_rmnod(
*/
if ( ! Chain_Is_empty( &the_jnode->info.directory.Entries ) )
- set_errno_and_return_minus_one( ENOTEMPTY );
+ rtems_set_errno_and_return_minus_one( ENOTEMPTY );
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
- set_errno_and_return_minus_one( EBUSY );
+ rtems_set_errno_and_return_minus_one( EBUSY );
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
- set_errno_and_return_minus_one( EBUSY );
+ rtems_set_errno_and_return_minus_one( EBUSY );
/*
* Take the node out of the parent's chain that contains this node
diff --git a/cpukit/libfs/src/imfs/imfs_eval.c b/cpukit/libfs/src/imfs/imfs_eval.c
index e7479869b0..09838230cb 100644
--- a/cpukit/libfs/src/imfs/imfs_eval.c
+++ b/cpukit/libfs/src/imfs/imfs_eval.c
@@ -25,6 +25,7 @@
#include "imfs.h"
#include <rtems/libio_.h>
+#include <rtems/seterr.h>
#define RTEMS_LIBIO_PERMS_RX (RTEMS_LIBIO_PERMS_SEARCH | RTEMS_LIBIO_PERMS_READ)
#define RTEMS_LIBIO_PERMS_WX (RTEMS_LIBIO_PERMS_SEARCH | RTEMS_LIBIO_PERMS_WRITE)
@@ -80,7 +81,7 @@ int IMFS_evaluate_permission(
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
- set_errno_and_return_minus_one( EIO );
+ rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
@@ -150,7 +151,7 @@ int IMFS_evaluate_hard_link(
*/
if ( !IMFS_evaluate_permission( node, flags ) )
- set_errno_and_return_minus_one( EACCES );
+ rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
@@ -212,7 +213,7 @@ int IMFS_evaluate_sym_link(
*/
if ( !IMFS_evaluate_permission( node, flags ) )
- set_errno_and_return_minus_one( EACCES );
+ rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
@@ -241,7 +242,7 @@ int IMFS_evaluate_link(
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
- set_errno_and_return_minus_one( ELOOP );
+ rtems_set_errno_and_return_minus_one( ELOOP );
}
/*
@@ -307,7 +308,7 @@ int IMFS_evaluate_for_make(
i += len;
if ( !pathloc->node_access )
- set_errno_and_return_minus_one( ENOENT );
+ rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
@@ -316,7 +317,7 @@ int IMFS_evaluate_for_make(
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
- set_errno_and_return_minus_one( EACCES );
+ rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
@@ -352,7 +353,7 @@ int IMFS_evaluate_for_make(
} else {
if ( !node->Parent )
- set_errno_and_return_minus_one( ENOENT );
+ rtems_set_errno_and_return_minus_one( ENOENT );
node = node->Parent;
}
@@ -378,14 +379,14 @@ int IMFS_evaluate_for_make(
node = pathloc->node_access;
if ( !node )
- set_errno_and_return_minus_one( ENOTDIR );
+ rtems_set_errno_and_return_minus_one( ENOTDIR );
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
+ rtems_set_errno_and_return_minus_one( ENOTDIR );
/*
* If we are at a node that is a mount point. Set loc to the
@@ -417,11 +418,11 @@ int IMFS_evaluate_for_make(
break;
case IMFS_NO_MORE_PATH:
- set_errno_and_return_minus_one( EEXIST );
+ rtems_set_errno_and_return_minus_one( EEXIST );
break;
case IMFS_INVALID_TOKEN:
- set_errno_and_return_minus_one( ENAMETOOLONG );
+ rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
break;
case IMFS_CURRENT_DIR:
@@ -438,7 +439,7 @@ int IMFS_evaluate_for_make(
for( ; path[i] != '\0'; i++) {
if ( !IMFS_is_separator( path[ i ] ) )
- set_errno_and_return_minus_one( ENOENT );
+ rtems_set_errno_and_return_minus_one( ENOENT );
}
/*
@@ -452,14 +453,14 @@ int IMFS_evaluate_for_make(
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
+ rtems_set_errno_and_return_minus_one( ENOTDIR );
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
- set_errno_and_return_minus_one( EACCES );
+ rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
@@ -489,7 +490,7 @@ int IMFS_eval_path(
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
- set_errno_and_return_minus_one( EIO );
+ rtems_set_errno_and_return_minus_one( EIO );
}
/*
@@ -509,7 +510,7 @@ int IMFS_eval_path(
i += len;
if ( !pathloc->node_access )
- set_errno_and_return_minus_one( ENOENT );
+ rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
@@ -517,7 +518,7 @@ int IMFS_eval_path(
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
- set_errno_and_return_minus_one( EACCES );
+ rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
@@ -551,7 +552,7 @@ int IMFS_eval_path(
} else {
if ( !node->Parent )
- set_errno_and_return_minus_one( ENOENT );
+ rtems_set_errno_and_return_minus_one( ENOENT );
node = node->Parent;
pathloc->node_access = node;
@@ -572,7 +573,7 @@ int IMFS_eval_path(
node = pathloc->node_access;
if ( !node )
- set_errno_and_return_minus_one( ENOTDIR );
+ rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
@@ -588,7 +589,7 @@ int IMFS_eval_path(
*/
if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
+ rtems_set_errno_and_return_minus_one( ENOTDIR );
/*
* If we are at a node that is a mount point. Set loc to the
@@ -607,7 +608,7 @@ int IMFS_eval_path(
node = IMFS_find_match_in_dir( node, token );
if ( !node )
- set_errno_and_return_minus_one( ENOENT );
+ rtems_set_errno_and_return_minus_one( ENOENT );
/*
* Set the node access to the point we have found.
@@ -621,7 +622,7 @@ int IMFS_eval_path(
break;
case IMFS_INVALID_TOKEN:
- set_errno_and_return_minus_one( ENAMETOOLONG );
+ rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
break;
}
@@ -653,7 +654,7 @@ int IMFS_eval_path(
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
- set_errno_and_return_minus_one( EACCES );
+ rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
diff --git a/cpukit/libfs/src/imfs/imfs_fchmod.c b/cpukit/libfs/src/imfs/imfs_fchmod.c
index 3c32e0c836..cf7c644793 100644
--- a/cpukit/libfs/src/imfs/imfs_fchmod.c
+++ b/cpukit/libfs/src/imfs/imfs_fchmod.c
@@ -18,6 +18,7 @@
#include <errno.h>
#include <rtems/libio_.h>
+#include <rtems/seterr.h>
#include "imfs.h"
int IMFS_fchmod(
@@ -39,14 +40,14 @@ int IMFS_fchmod(
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
- set_errno_and_return_minus_one( EPERM );
+ rtems_set_errno_and_return_minus_one( EPERM );
#endif
/*
* Change only the RWX permissions on the jnode to mode.
*/
if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) )
- set_errno_and_return_minus_one( EPERM );
+ rtems_set_errno_and_return_minus_one( EPERM );
/*
* If we make a linear-file writeable, construct a block file
diff --git a/cpukit/libfs/src/imfs/imfs_link.c b/cpukit/libfs/src/imfs/imfs_link.c
index ca7ffed784..610c3cb831 100644
--- a/cpukit/libfs/src/imfs/imfs_link.c
+++ b/cpukit/libfs/src/imfs/imfs_link.c
@@ -22,6 +22,7 @@
#include <errno.h>
#include "imfs.h"
#include <rtems/libio_.h>
+#include <rtems/seterr.h>
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
@@ -40,7 +41,7 @@ int IMFS_link(
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
- set_errno_and_return_minus_one( EMLINK );
+ rtems_set_errno_and_return_minus_one( EMLINK );
/*
* Remove any separators at the end of the string.
@@ -61,7 +62,7 @@ int IMFS_link(
);
if ( !new_node )
- set_errno_and_return_minus_one( ENOMEM );
+ rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
diff --git a/cpukit/libfs/src/imfs/imfs_mknod.c b/cpukit/libfs/src/imfs/imfs_mknod.c
index 4a2e8921d9..670f71fe7d 100644
--- a/cpukit/libfs/src/imfs/imfs_mknod.c
+++ b/cpukit/libfs/src/imfs/imfs_mknod.c
@@ -26,6 +26,7 @@
#include "imfs.h"
#include <rtems/libio_.h>
+#include <rtems/seterr.h>
int IMFS_mknod(
const char *token, /* IN */
@@ -54,7 +55,7 @@ int IMFS_mknod(
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
} else {
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
/*
@@ -70,7 +71,7 @@ int IMFS_mknod(
);
if ( !new_node )
- set_errno_and_return_minus_one( ENOMEM );
+ rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
}
diff --git a/cpukit/libfs/src/imfs/imfs_mount.c b/cpukit/libfs/src/imfs/imfs_mount.c
index 158210cd3d..1674d9a60d 100644
--- a/cpukit/libfs/src/imfs/imfs_mount.c
+++ b/cpukit/libfs/src/imfs/imfs_mount.c
@@ -26,6 +26,7 @@
#include "imfs.h"
#include <rtems/libio_.h>
+#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
@@ -40,7 +41,7 @@ int IMFS_mount(
*/
if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
+ rtems_set_errno_and_return_minus_one( ENOTDIR );
/*
* Set mt_fs pointer to point to the mount table entry for
diff --git a/cpukit/libfs/src/imfs/imfs_readlink.c b/cpukit/libfs/src/imfs/imfs_readlink.c
index 78275320e6..89ef715086 100644
--- a/cpukit/libfs/src/imfs/imfs_readlink.c
+++ b/cpukit/libfs/src/imfs/imfs_readlink.c
@@ -21,6 +21,7 @@
#include <errno.h>
#include "imfs.h"
#include <rtems/libio_.h>
+#include <rtems/seterr.h>
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
@@ -34,7 +35,7 @@ int IMFS_readlink(
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
buf[i] = node->info.sym_link.name[i];
diff --git a/cpukit/libfs/src/imfs/imfs_stat.c b/cpukit/libfs/src/imfs/imfs_stat.c
index 17e1708191..bd1e319d0b 100644
--- a/cpukit/libfs/src/imfs/imfs_stat.c
+++ b/cpukit/libfs/src/imfs/imfs_stat.c
@@ -20,6 +20,7 @@
#include <errno.h>
#include "imfs.h"
#include <rtems/libio_.h>
+#include <rtems/seterr.h>
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
@@ -49,7 +50,7 @@ int IMFS_stat(
break;
default:
- set_errno_and_return_minus_one( ENOTSUP );
+ rtems_set_errno_and_return_minus_one( ENOTSUP );
break;
}
diff --git a/cpukit/libfs/src/imfs/imfs_symlink.c b/cpukit/libfs/src/imfs/imfs_symlink.c
index 88a1df59b9..5a062f3439 100644
--- a/cpukit/libfs/src/imfs/imfs_symlink.c
+++ b/cpukit/libfs/src/imfs/imfs_symlink.c
@@ -22,6 +22,7 @@
#include <errno.h>
#include "imfs.h"
#include <rtems/libio_.h>
+#include <rtems/seterr.h>
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
@@ -55,7 +56,7 @@ int IMFS_symlink(
);
if ( !new_node )
- set_errno_and_return_minus_one( ENOMEM );
+ rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
}
diff --git a/cpukit/libfs/src/imfs/imfs_unlink.c b/cpukit/libfs/src/imfs/imfs_unlink.c
index 65737a56a7..9e0861b53a 100644
--- a/cpukit/libfs/src/imfs/imfs_unlink.c
+++ b/cpukit/libfs/src/imfs/imfs_unlink.c
@@ -22,6 +22,7 @@
#include "imfs.h"
#include <rtems/libio_.h>
+#include <rtems/seterr.h>
int IMFS_unlink(
rtems_filesystem_location_info_t *loc /* IN */
@@ -46,7 +47,7 @@ int IMFS_unlink(
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
the_link.node_access = node->info.hard_link.link_node;
diff --git a/cpukit/libfs/src/imfs/imfs_unmount.c b/cpukit/libfs/src/imfs/imfs_unmount.c
index 1ad0344275..ea40def946 100644
--- a/cpukit/libfs/src/imfs/imfs_unmount.c
+++ b/cpukit/libfs/src/imfs/imfs_unmount.c
@@ -27,6 +27,7 @@
#include "imfs.h"
#include <rtems/libio_.h>
+#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
@@ -41,14 +42,14 @@ int IMFS_unmount(
*/
if ( node->type != IMFS_DIRECTORY )
- set_errno_and_return_minus_one( ENOTDIR );
+ rtems_set_errno_and_return_minus_one( ENOTDIR );
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
- set_errno_and_return_minus_one( EINVAL ); /* XXX */
+ rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
/*
* Set the mt_fs pointer to indicate that there is no longer
diff --git a/cpukit/libfs/src/imfs/ioman.c b/cpukit/libfs/src/imfs/ioman.c
index 198cd66674..04755253ae 100644
--- a/cpukit/libfs/src/imfs/ioman.c
+++ b/cpukit/libfs/src/imfs/ioman.c
@@ -25,6 +25,7 @@
#include <rtems.h>
#include <rtems/libio_.h>
+#include <rtems/seterr.h>
#include "imfs.h"
#if defined(__linux__)
@@ -84,7 +85,7 @@ rtems_status_code rtems_io_lookup_name(
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
- set_errno_and_return_minus_one( ENOTSUP );
+ rtems_set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type_h)( &loc );
diff --git a/cpukit/libfs/src/imfs/linearfile.c b/cpukit/libfs/src/imfs/linearfile.c
index 7a47c7c5ef..b3df9ba202 100644
--- a/cpukit/libfs/src/imfs/linearfile.c
+++ b/cpukit/libfs/src/imfs/linearfile.c
@@ -28,6 +28,7 @@
#include <rtems/libio.h>
#include "imfs.h"
#include <rtems/libio_.h>
+#include <rtems/seterr.h>
/*
* linearfile_read
@@ -55,11 +56,11 @@ int linearfile_read(
assert( the_jnode );
if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
+ rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_LINEAR_FILE );
if ( the_jnode->type != IMFS_LINEAR_FILE )
- set_errno_and_return_minus_one( EIO );
+ rtems_set_errno_and_return_minus_one( EIO );
/*
* Error checks on arguments
@@ -68,7 +69,7 @@ int linearfile_read(
dest = (unsigned char *)buffer;
assert( dest );
if ( !dest )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Perform a simple memory copy.
diff --git a/cpukit/libfs/src/imfs/memfile.c b/cpukit/libfs/src/imfs/memfile.c
index 5927b155aa..042c35fbd5 100644
--- a/cpukit/libfs/src/imfs/memfile.c
+++ b/cpukit/libfs/src/imfs/memfile.c
@@ -29,6 +29,7 @@
#include <rtems/libio.h>
#include "imfs.h"
#include <rtems/libio_.h>
+#include <rtems/seterr.h>
#define MEMFILE_STATIC
@@ -208,7 +209,7 @@ int memfile_lseek(
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
- set_errno_and_return_minus_one( ENOSPC );
+ rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
@@ -282,14 +283,14 @@ MEMFILE_STATIC int IMFS_memfile_extend(
assert( the_jnode );
if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
+ rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
+ rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
return 0;
@@ -310,7 +311,7 @@ MEMFILE_STATIC int IMFS_memfile_extend(
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
}
- set_errno_and_return_minus_one( ENOSPC );
+ rtems_set_errno_and_return_minus_one( ENOSPC );
}
}
@@ -338,11 +339,11 @@ MEMFILE_STATIC int IMFS_memfile_addblock(
assert( the_jnode );
if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
+ rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
+ rtems_set_errno_and_return_minus_one( EIO );
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
if ( *block_entry_ptr )
@@ -469,11 +470,11 @@ int IMFS_memfile_remove(
assert( the_jnode );
if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
+ rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
+ rtems_set_errno_and_return_minus_one( EIO );
/*
* Eventually this could be set smarter at each call to
@@ -563,13 +564,13 @@ MEMFILE_STATIC int IMFS_memfile_read(
assert( the_jnode );
if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
+ rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
the_jnode->type == IMFS_LINEAR_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE &&
the_jnode->type != IMFS_LINEAR_FILE )
- set_errno_and_return_minus_one( EIO );
+ rtems_set_errno_and_return_minus_one( EIO );
/*
* Error checks on arguments
@@ -577,7 +578,7 @@ MEMFILE_STATIC int IMFS_memfile_read(
assert( dest );
if ( !dest )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If there is nothing to read, then quick exit.
@@ -585,7 +586,7 @@ MEMFILE_STATIC int IMFS_memfile_read(
my_length = length;
if ( !my_length )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Linear files (as created from a tar file are easier to handle
@@ -714,11 +715,11 @@ MEMFILE_STATIC int IMFS_memfile_write(
assert( the_jnode );
if ( !the_jnode )
- set_errno_and_return_minus_one( EIO );
+ rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
- set_errno_and_return_minus_one( EIO );
+ rtems_set_errno_and_return_minus_one( EIO );
/*
* Error check arguments
@@ -726,7 +727,7 @@ MEMFILE_STATIC int IMFS_memfile_write(
assert( source );
if ( !source )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
/*
@@ -735,7 +736,7 @@ MEMFILE_STATIC int IMFS_memfile_write(
my_length = length;
if ( !my_length )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the last byte we are supposed to write is past the end of this
@@ -746,7 +747,7 @@ MEMFILE_STATIC int IMFS_memfile_write(
if ( last_byte > the_jnode->info.file.size ) {
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
- set_errno_and_return_minus_one( ENOSPC );
+ rtems_set_errno_and_return_minus_one( ENOSPC );
}
copied = 0;