summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/imfs
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libfs/src/imfs')
-rw-r--r--cpukit/libfs/src/imfs/deviceio.c2
-rw-r--r--cpukit/libfs/src/imfs/imfs.h30
-rw-r--r--cpukit/libfs/src/imfs/imfs_chown.c2
-rw-r--r--cpukit/libfs/src/imfs/imfs_creat.c2
-rw-r--r--cpukit/libfs/src/imfs/imfs_debug.c4
-rw-r--r--cpukit/libfs/src/imfs/imfs_directory.c66
-rw-r--r--cpukit/libfs/src/imfs/imfs_eval.c66
-rw-r--r--cpukit/libfs/src/imfs/imfs_fchmod.c2
-rw-r--r--cpukit/libfs/src/imfs/imfs_fcntl.c2
-rw-r--r--cpukit/libfs/src/imfs/imfs_free.c4
-rw-r--r--cpukit/libfs/src/imfs/imfs_fsunmount.c10
-rw-r--r--cpukit/libfs/src/imfs/imfs_getchild.c2
-rw-r--r--cpukit/libfs/src/imfs/imfs_gtkn.c6
-rw-r--r--cpukit/libfs/src/imfs/imfs_init.c2
-rw-r--r--cpukit/libfs/src/imfs/imfs_link.c6
-rw-r--r--cpukit/libfs/src/imfs/imfs_load_tar.c10
-rw-r--r--cpukit/libfs/src/imfs/imfs_mknod.c8
-rw-r--r--cpukit/libfs/src/imfs/imfs_mount.c4
-rw-r--r--cpukit/libfs/src/imfs/imfs_ntype.c2
-rw-r--r--cpukit/libfs/src/imfs/imfs_readlink.c6
-rw-r--r--cpukit/libfs/src/imfs/imfs_rmnod.c8
-rw-r--r--cpukit/libfs/src/imfs/imfs_stat.c6
-rw-r--r--cpukit/libfs/src/imfs/imfs_symlink.c2
-rw-r--r--cpukit/libfs/src/imfs/imfs_unixstub.c4
-rw-r--r--cpukit/libfs/src/imfs/imfs_unlink.c6
-rw-r--r--cpukit/libfs/src/imfs/imfs_unmount.c16
-rw-r--r--cpukit/libfs/src/imfs/imfs_utime.c2
-rw-r--r--cpukit/libfs/src/imfs/ioman.c10
-rw-r--r--cpukit/libfs/src/imfs/memfile.c28
29 files changed, 159 insertions, 159 deletions
diff --git a/cpukit/libfs/src/imfs/deviceio.c b/cpukit/libfs/src/imfs/deviceio.c
index 4737d087c8..c0758396e3 100644
--- a/cpukit/libfs/src/imfs/deviceio.c
+++ b/cpukit/libfs/src/imfs/deviceio.c
@@ -47,7 +47,7 @@ static int
rtems_deviceio_errno(rtems_status_code code)
{
int rc;
-
+
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
{
errno = rc;
diff --git a/cpukit/libfs/src/imfs/imfs.h b/cpukit/libfs/src/imfs/imfs.h
index d2ee3fa5a6..eb41abd03d 100644
--- a/cpukit/libfs/src/imfs/imfs.h
+++ b/cpukit/libfs/src/imfs/imfs.h
@@ -138,9 +138,9 @@ typedef union {
IMFS_directory_t directory;
IMFS_device_t device;
IMFS_link_t hard_link;
- IMFS_sym_link_t sym_link;
- IMFS_memfile_t file;
- IMFS_linearfile_t linearfile;
+ IMFS_sym_link_t sym_link;
+ IMFS_memfile_t file;
+ IMFS_linearfile_t linearfile;
} IMFS_types_union;
/*
@@ -156,7 +156,7 @@ typedef union {
struct IMFS_jnode_tt {
Chain_Node Node; /* for chaining them together */
IMFS_jnode_t *Parent; /* Parent node */
- char name[IMFS_NAME_MAX+1]; /* "basename" */
+ char name[IMFS_NAME_MAX+1]; /* "basename" */
mode_t st_mode; /* File mode */
nlink_t st_nlink; /* Link count */
ino_t st_ino; /* inode */
@@ -177,14 +177,14 @@ struct IMFS_jnode_tt {
gettimeofday( &tv, 0 ); \
_jnode->stat_atime = (time_t) tv.tv_sec; \
} while (0)
-
+
#define IMFS_update_mtime( _jnode ) \
do { \
struct timeval tv; \
gettimeofday( &tv, 0 ); \
_jnode->stat_mtime = (time_t) tv.tv_sec; \
} while (0)
-
+
#define IMFS_update_ctime( _jnode ) \
do { \
struct timeval tv; \
@@ -216,7 +216,7 @@ typedef struct {
#endif
#define decrement_linkcounts( _fs_info ) \
- ((IMFS_fs_info_t * )_fs_info)->link_counts--;
+ ((IMFS_fs_info_t * )_fs_info)->link_counts--;
/*
* Type defination for tokens returned from IMFS_get_token
@@ -241,21 +241,21 @@ extern rtems_filesystem_file_handlers_r IMFS_linearfile_handlers;
extern rtems_filesystem_file_handlers_r IMFS_memfile_handlers;
extern rtems_filesystem_operations_table IMFS_ops;
extern rtems_filesystem_operations_table miniIMFS_ops;
-extern rtems_filesystem_limits_and_options_t IMFS_LIMITS_AND_OPTIONS;
+extern rtems_filesystem_limits_and_options_t IMFS_LIMITS_AND_OPTIONS;
/*
* Routines
*/
-int IMFS_initialize(
+int IMFS_initialize(
rtems_filesystem_mount_table_entry_t *mt_entry
);
-int miniIMFS_initialize(
+int miniIMFS_initialize(
rtems_filesystem_mount_table_entry_t *mt_entry
);
-int IMFS_initialize_support(
+int IMFS_initialize_support(
rtems_filesystem_mount_table_entry_t *mt_entry,
rtems_filesystem_operations_table *op_table,
rtems_filesystem_file_handlers_r *linearfile_handlers,
@@ -306,8 +306,8 @@ int IMFS_stat(
struct stat *buf /* OUT */
);
-int IMFS_Set_handlers(
- rtems_filesystem_location_info_t *loc
+int IMFS_Set_handlers(
+ rtems_filesystem_location_info_t *loc
);
int IMFS_evaluate_link(
@@ -315,7 +315,7 @@ int IMFS_evaluate_link(
int flags /* IN */
);
-int IMFS_eval_path(
+int IMFS_eval_path(
const char *pathname, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
@@ -522,7 +522,7 @@ int IMFS_symlink(
int IMFS_readlink(
rtems_filesystem_location_info_t *loc, /* IN */
char *buf, /* OUT */
- size_t bufsize
+ size_t bufsize
);
int IMFS_fdatasync(
diff --git a/cpukit/libfs/src/imfs/imfs_chown.c b/cpukit/libfs/src/imfs/imfs_chown.c
index 344ce6387f..7f0c7b5688 100644
--- a/cpukit/libfs/src/imfs/imfs_chown.c
+++ b/cpukit/libfs/src/imfs/imfs_chown.c
@@ -1,7 +1,7 @@
/*
* IMFS_chown
*
- * This routine is the implementation of the chown() system
+ * This routine is the implementation of the chown() system
* call for the IMFS.
*
* COPYRIGHT (c) 1989-1999.
diff --git a/cpukit/libfs/src/imfs/imfs_creat.c b/cpukit/libfs/src/imfs/imfs_creat.c
index c95b99a96b..94d9dac9c1 100644
--- a/cpukit/libfs/src/imfs/imfs_creat.c
+++ b/cpukit/libfs/src/imfs/imfs_creat.c
@@ -61,7 +61,7 @@ IMFS_jnode_t *IMFS_create_node(
*/
node->st_mode = mode & ~rtems_filesystem_umask;
-
+
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
node->st_gid = getegid();
diff --git a/cpukit/libfs/src/imfs/imfs_debug.c b/cpukit/libfs/src/imfs/imfs_debug.c
index 1927a69f22..094e90657d 100644
--- a/cpukit/libfs/src/imfs/imfs_debug.c
+++ b/cpukit/libfs/src/imfs/imfs_debug.c
@@ -33,7 +33,7 @@
*
* Printable names for each of the IMFS file system types.
*/
-
+
char *IMFS_types[ IMFS_NUMBER_OF_TYPES ] = {
"directory",
"device",
@@ -48,7 +48,7 @@ char *IMFS_types[ IMFS_NUMBER_OF_TYPES ] = {
* This routine prints the contents of the specified jnode.
*/
-void IMFS_print_jnode(
+void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
diff --git a/cpukit/libfs/src/imfs/imfs_directory.c b/cpukit/libfs/src/imfs/imfs_directory.c
index c9b88ef23c..b5ce125321 100644
--- a/cpukit/libfs/src/imfs/imfs_directory.c
+++ b/cpukit/libfs/src/imfs/imfs_directory.c
@@ -34,11 +34,11 @@
* imfs_dir_open
*
* This rountine will verify that the node being opened as a directory is
- * in fact a directory node. If it is then the offset into the directory
+ * in fact a directory node. If it is then the offset into the directory
* will be set to 0 to position to the first directory entry.
*/
-int imfs_dir_open(
+int imfs_dir_open(
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
@@ -60,14 +60,14 @@ int imfs_dir_open(
/*
* imfs_dir_read
*
- * This routine will read the next directory entry based on the directory
+ * This routine will read the next directory entry based on the directory
* offset. The offset should be equal to -n- time the size of an individual
- * dirent structure. If n is not an integer multiple of the sizeof a
- * dirent structure, an integer division will be performed to determine
+ * dirent structure. If n is not an integer multiple of the sizeof a
+ * dirent structure, an integer division will be performed to determine
* directory entry that will be returned in the buffer. Count should reflect
* -m- times the sizeof dirent bytes to be placed in the buffer.
* If there are not -m- dirent elements from the current directory position
- * to the end of the exisiting file, the remaining entries will be placed in
+ * to the end of the exisiting file, the remaining entries will be placed in
* the buffer and the returned value will be equal to -m actual- times the
* size of a directory entry.
*/
@@ -93,7 +93,7 @@ ssize_t imfs_dir_read(
the_jnode = (IMFS_jnode_t *)iop->file_info;
the_chain = &the_jnode->info.directory.Entries;
-
+
if ( Chain_Is_empty( the_chain ) )
return 0;
@@ -107,18 +107,18 @@ ssize_t imfs_dir_read(
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
- for (
- current_entry = 0;
- current_entry < last_entry;
+ for (
+ current_entry = 0;
+ current_entry < last_entry;
current_entry = current_entry + sizeof(struct dirent) ){
- if ( Chain_Is_tail( the_chain, the_node ) ){
+ if ( Chain_Is_tail( the_chain, the_node ) ){
/* We hit the tail of the chain while trying to move to the first */
/* entry in the read */
return bytes_transferred; /* Indicate that there are no more */
/* entries to return */
}
-
+
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
@@ -127,10 +127,10 @@ ssize_t imfs_dir_read(
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
strcpy( tmp_dirent.d_name, the_jnode->name );
- memcpy(
- buffer + bytes_transferred,
- (void *)&tmp_dirent,
- sizeof( struct dirent )
+ memcpy(
+ buffer + bytes_transferred,
+ (void *)&tmp_dirent,
+ sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
bytes_transferred = bytes_transferred + sizeof( struct dirent );
@@ -161,7 +161,7 @@ int imfs_dir_close(
* and associated memory. At present the imfs_dir_close simply
* returns a successful completion status.
*/
-
+
return 0;
}
@@ -170,7 +170,7 @@ int imfs_dir_close(
/*
* imfs_dir_lseek
*
- * This routine will behave in one of three ways based on the state of
+ * This routine will behave in one of three ways based on the state of
* argument whence. Based on the state of its value the offset argument will
* be interpreted using one of the following methods:
*
@@ -210,7 +210,7 @@ int imfs_dir_lseek(
/*
* imfs_dir_fstat
*
- * This routine will obtain the following information concerning the current
+ * This routine will obtain the following information concerning the current
* directory:
* st_dev 0ll
* st_ino 1
@@ -219,9 +219,9 @@ int imfs_dir_lseek(
* st_uid uid extracted from the jnode
* st_gid gid extracted from the jnode
* st_rdev 0ll
- * st_size the number of bytes in the directory
+ * st_size the number of bytes in the directory
* This is calculated by taking the number of entries
- * in the directory and multiplying by the size of a
+ * in the directory and multiplying by the size of a
* dirent structure
* st_blksize 0
* st_blocks 0
@@ -267,7 +267,7 @@ int imfs_dir_fstat(
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
-
+
buf->st_size = buf->st_size + sizeof( struct dirent );
}
@@ -277,7 +277,7 @@ int imfs_dir_fstat(
/*
* IMFS_dir_rmnod
*
- * This routine is available from the optable to remove a node
+ * This routine is available from the optable to remove a node
* from the IMFS file system.
*/
@@ -285,33 +285,33 @@ int imfs_dir_rmnod(
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
- IMFS_jnode_t *the_jnode;
+ IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
- /*
- * You cannot remove a node that still has children
+ /*
+ * You cannot remove a node that still has children
*/
if ( ! Chain_Is_empty( &the_jnode->info.directory.Entries ) )
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 )
rtems_set_errno_and_return_minus_one( EBUSY );
- /*
+ /*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
- rtems_set_errno_and_return_minus_one( EBUSY );
-
- /*
- * Take the node out of the parent's chain that contains this node
+ rtems_set_errno_and_return_minus_one( EBUSY );
+
+ /*
+ * Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
@@ -332,7 +332,7 @@ int imfs_dir_rmnod(
if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
- /*
+ /*
* Is the rtems_filesystem_current is this node?
*/
diff --git a/cpukit/libfs/src/imfs/imfs_eval.c b/cpukit/libfs/src/imfs/imfs_eval.c
index f53a33e02f..b2bac3f4da 100644
--- a/cpukit/libfs/src/imfs/imfs_eval.c
+++ b/cpukit/libfs/src/imfs/imfs_eval.c
@@ -81,30 +81,30 @@ int IMFS_evaluate_permission(
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
- rtems_set_errno_and_return_minus_one( EIO );
+ rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
- st_gid = getegid();
+ st_gid = getegid();
#else
st_uid = jnode->st_uid;
st_gid = jnode->st_gid;
#endif
-
+
/*
* Check if I am owner or a group member or someone else.
*/
-
+
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
flags_to_test <<= 3;
- else
+ else
/* must be other - do nothing */;
/*
@@ -143,7 +143,7 @@ int IMFS_evaluate_hard_link(
*/
node->node_access = jnode->info.hard_link.link_node;
-
+
IMFS_Set_handlers( node );
/*
@@ -157,13 +157,13 @@ int IMFS_evaluate_hard_link(
}
-/*
+/*
* IMFS_evaluate_sym_link
*
* The following routine evaluates a symbolic link to the actual node.
*/
-int IMFS_evaluate_sym_link(
+int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
@@ -190,7 +190,7 @@ int IMFS_evaluate_sym_link(
node->node_access = jnode->Parent;
- rtems_filesystem_get_sym_start_loc(
+ rtems_filesystem_get_sym_start_loc(
jnode->info.sym_link.name,
&i,
node
@@ -200,7 +200,7 @@ int IMFS_evaluate_sym_link(
* Use eval path to evaluate the path of the symbolic link.
*/
- result = IMFS_eval_path(
+ result = IMFS_eval_path(
&jnode->info.sym_link.name[i],
flags,
node
@@ -224,7 +224,7 @@ int IMFS_evaluate_sym_link(
* The following routine returns the real node pointed to by a link.
*/
-int IMFS_evaluate_link(
+int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
@@ -255,7 +255,7 @@ int IMFS_evaluate_link(
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
- } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
+ } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
/*
@@ -265,7 +265,7 @@ int IMFS_evaluate_link(
rtems_filesystem_link_counts = 0;
return result;
-}
+}
/*
@@ -273,7 +273,7 @@ int IMFS_evaluate_link(
*
* The following routine evaluate path for a new node to be created.
* pathloc is returned with a pointer to the parent of the new node.
- * name is returned with a pointer to the first character in the
+ * name is returned with a pointer to the first character in the
* new node name. The parent node is verified to be a directory.
*/
@@ -290,8 +290,8 @@ int IMFS_evaluate_for_make(
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int done = 0;
- int result;
-
+ int result;
+
/*
* This was filled in by the caller and is valid in the
* mount table.
@@ -306,7 +306,7 @@ int IMFS_evaluate_for_make(
type = IMFS_get_token( &path[i], token, &len );
i += len;
-
+
if ( !pathloc->node_access )
rtems_set_errno_and_return_minus_one( ENOENT );
@@ -343,7 +343,7 @@ int IMFS_evaluate_for_make(
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
- break;
+ break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
@@ -379,7 +379,7 @@ int IMFS_evaluate_for_make(
node = pathloc->node_access;
if ( !node )
- rtems_set_errno_and_return_minus_one( ENOTDIR );
+ rtems_set_errno_and_return_minus_one( ENOTDIR );
/*
* Only a directory can be decended into.
@@ -406,7 +406,7 @@ int IMFS_evaluate_for_make(
node = IMFS_find_match_in_dir( node, token );
/*
- * If there is no node we have found the name of the node we
+ * If there is no node we have found the name of the node we
* wish to create.
*/
@@ -416,7 +416,7 @@ int IMFS_evaluate_for_make(
pathloc->node_access = node;
break;
-
+
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
break;
@@ -431,18 +431,18 @@ int IMFS_evaluate_for_make(
}
*name = &path[ i - len ];
-
+
/*
* We have evaluated the path as far as we can.
- * Verify there is not any invalid stuff at the end of the name.
+ * Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
- if ( !IMFS_is_separator( path[ i ] ) )
+ if ( !IMFS_is_separator( path[ i ] ) )
rtems_set_errno_and_return_minus_one( ENOENT );
}
- /*
+ /*
* Verify we can execute and write to this directory.
*/
@@ -461,7 +461,7 @@ int IMFS_evaluate_for_make(
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
-
+
return result;
}
@@ -474,7 +474,7 @@ int IMFS_evaluate_for_make(
* node to be accessed.
*/
-int IMFS_eval_path(
+int IMFS_eval_path(
const char *pathname, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
@@ -486,15 +486,15 @@ int IMFS_eval_path(
char token[ IMFS_NAME_MAX + 1 ];
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
- int result;
+ int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
- rtems_set_errno_and_return_minus_one( EIO );
+ rtems_set_errno_and_return_minus_one( EIO );
}
/*
- * This was filled in by the caller and is valid in the
+ * This was filled in by the caller and is valid in the
* mount table.
*/
@@ -508,7 +508,7 @@ int IMFS_eval_path(
type = IMFS_get_token( &pathname[i], token, &len );
i += len;
-
+
if ( !pathloc->node_access )
rtems_set_errno_and_return_minus_one( ENOENT );
@@ -535,7 +535,7 @@ int IMFS_eval_path(
* Am I at the root of this mounted filesystem?
*/
- if (pathloc->node_access ==
+ if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
/*
@@ -565,7 +565,7 @@ int IMFS_eval_path(
case IMFS_NAME:
/*
* If we are at a link follow it.
- */
+ */
if ( node->type == IMFS_HARD_LINK ) {
diff --git a/cpukit/libfs/src/imfs/imfs_fchmod.c b/cpukit/libfs/src/imfs/imfs_fchmod.c
index b4c6dc0972..4d30b98781 100644
--- a/cpukit/libfs/src/imfs/imfs_fchmod.c
+++ b/cpukit/libfs/src/imfs/imfs_fchmod.c
@@ -37,7 +37,7 @@ int IMFS_fchmod(
unsigned int length
);
-
+
jnode = loc->node_access;
/*
diff --git a/cpukit/libfs/src/imfs/imfs_fcntl.c b/cpukit/libfs/src/imfs/imfs_fcntl.c
index d6dcd4d75e..ca802b8331 100644
--- a/cpukit/libfs/src/imfs/imfs_fcntl.c
+++ b/cpukit/libfs/src/imfs/imfs_fcntl.c
@@ -1,7 +1,7 @@
/*
* IMFS_fcntl
*
- * The following routine does a fcntl on an IMFS node.
+ * The following routine does a fcntl on an IMFS node.
*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/libfs/src/imfs/imfs_free.c b/cpukit/libfs/src/imfs/imfs_free.c
index 19b4f1b7e0..affbcaa044 100644
--- a/cpukit/libfs/src/imfs/imfs_free.c
+++ b/cpukit/libfs/src/imfs/imfs_free.c
@@ -25,8 +25,8 @@
* IMFS_freenodinfo
*
* This routine is the IMFS free node handler for the file system
- * operations table.
- *
+ * operations table.
+ *
* The In Memory File System keeps its nodes in memory. This routine
* is for file sytems that do not.
*/
diff --git a/cpukit/libfs/src/imfs/imfs_fsunmount.c b/cpukit/libfs/src/imfs/imfs_fsunmount.c
index 72e44af6d8..c87b2e665b 100644
--- a/cpukit/libfs/src/imfs/imfs_fsunmount.c
+++ b/cpukit/libfs/src/imfs/imfs_fsunmount.c
@@ -51,17 +51,17 @@ int IMFS_fsunmount(
{
IMFS_jnode_t *jnode;
IMFS_jnode_t *next;
- rtems_filesystem_location_info_t loc;
+ rtems_filesystem_location_info_t loc;
int result = 0;
- /*
- * Traverse tree that starts at the mt_fs_root and deallocate memory
+ /*
+ * Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
-
+
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
loc = temp_mt_entry->mt_fs_root;
-
+
/*
* Set this to null to indicate that it is being unmounted.
*/
diff --git a/cpukit/libfs/src/imfs/imfs_getchild.c b/cpukit/libfs/src/imfs/imfs_getchild.c
index 51b9ddb6cc..67663db8ea 100644
--- a/cpukit/libfs/src/imfs/imfs_getchild.c
+++ b/cpukit/libfs/src/imfs/imfs_getchild.c
@@ -26,7 +26,7 @@ static char dotname[2] = ".";
static char dotdotname[3] = "..";
IMFS_jnode_t *IMFS_find_match_in_dir(
- IMFS_jnode_t *directory,
+ IMFS_jnode_t *directory,
char *name
)
{
diff --git a/cpukit/libfs/src/imfs/imfs_gtkn.c b/cpukit/libfs/src/imfs/imfs_gtkn.c
index ad6a1f8d5e..09f1ab0174 100644
--- a/cpukit/libfs/src/imfs/imfs_gtkn.c
+++ b/cpukit/libfs/src/imfs/imfs_gtkn.c
@@ -1,5 +1,5 @@
/*
- * IMFS_get_token
+ * IMFS_get_token
*
* Routine to get a token (name or separator) from the path
* the length of the token is returned in token_len.
@@ -34,7 +34,7 @@ IMFS_token_types IMFS_get_token(
IMFS_token_types type = IMFS_NAME;
register char c;
- /*
+ /*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
@@ -46,7 +46,7 @@ IMFS_token_types IMFS_get_token(
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
- type = IMFS_INVALID_TOKEN;
+ type = IMFS_INVALID_TOKEN;
c = path [++i];
}
diff --git a/cpukit/libfs/src/imfs/imfs_init.c b/cpukit/libfs/src/imfs/imfs_init.c
index 0f6d4fda6c..6582e72614 100644
--- a/cpukit/libfs/src/imfs/imfs_init.c
+++ b/cpukit/libfs/src/imfs/imfs_init.c
@@ -29,7 +29,7 @@
#include <stdio.h>
#endif
-/*
+/*
* IMFS file system operations table
*/
diff --git a/cpukit/libfs/src/imfs/imfs_link.c b/cpukit/libfs/src/imfs/imfs_link.c
index e38259ad7e..43c1613cfc 100644
--- a/cpukit/libfs/src/imfs/imfs_link.c
+++ b/cpukit/libfs/src/imfs/imfs_link.c
@@ -1,5 +1,5 @@
/*
- * IMFS_link
+ * IMFS_link
*
* The following rouine creates a new link node under parent with the
* name given in name. The link node is set to point to the node at
@@ -42,7 +42,7 @@ int IMFS_link(
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
rtems_set_errno_and_return_minus_one( EMLINK );
-
+
/*
* Remove any separators at the end of the string.
*/
@@ -56,7 +56,7 @@ int IMFS_link(
new_node = IMFS_create_node(
parent_loc,
IMFS_HARD_LINK,
- new_name,
+ new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
diff --git a/cpukit/libfs/src/imfs/imfs_load_tar.c b/cpukit/libfs/src/imfs/imfs_load_tar.c
index 80f93f1dfa..fd9d226003 100644
--- a/cpukit/libfs/src/imfs/imfs_load_tar.c
+++ b/cpukit/libfs/src/imfs/imfs_load_tar.c
@@ -47,7 +47,7 @@
* 345 167 bytes Padding
* 512 (s+p)bytes File contents (s+p) := (((s) + 511) & ~511),
* round up to 512 bytes
- *
+ *
* Checksum:
* int i, sum;
* char* header = tar_header_pointer;
@@ -81,7 +81,7 @@ static int compute_tar_header_checksum(char *bufr);
* tar image and perform as follows:
* - For directories, simply call mkdir(). The IMFS creates nodes as
* needed.
- * - For files, we make our own calls to IMFS eval_for_make and
+ * - For files, we make our own calls to IMFS eval_for_make and
* create_node.
*************************************************************************/
int
@@ -141,7 +141,7 @@ rtems_tarfs_load(char *mountpoint,
/******************************************************************
* Generate an IMFS node depending on the file type.
- * - For directories, just create directories as usual. IMFS
+ * - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*****************************************************************/
@@ -225,7 +225,7 @@ octal2ulong(char *octascii, int len)
mult = 1;
for (i=len-1; i>=0; i--)
{
- if (octascii[i] < '0')
+ if (octascii[i] < '0')
continue;
if (octascii[i] > '9')
continue;
@@ -238,7 +238,7 @@ octal2ulong(char *octascii, int len)
/************************************************************************
- * Compute the TAR checksum and check with the value in
+ * Compute the TAR checksum and check with the value in
* the archive. The checksum is computed over the entire
* header, but the checksum field is substituted with blanks.
************************************************************************/
diff --git a/cpukit/libfs/src/imfs/imfs_mknod.c b/cpukit/libfs/src/imfs/imfs_mknod.c
index 3a6ea477a7..abb9ab4052 100644
--- a/cpukit/libfs/src/imfs/imfs_mknod.c
+++ b/cpukit/libfs/src/imfs/imfs_mknod.c
@@ -30,7 +30,7 @@
int IMFS_mknod(
const char *token, /* IN */
- mode_t mode, /* IN */
+ mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
@@ -40,7 +40,7 @@ int IMFS_mknod(
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
-
+
IMFS_get_token( token, new_name, &result );
/*
@@ -57,7 +57,7 @@ int IMFS_mknod(
} else {
rtems_set_errno_and_return_minus_one( EINVAL );
}
-
+
/*
* Allocate and fill in an IMFS jnode
*/
@@ -65,7 +65,7 @@ int IMFS_mknod(
new_node = IMFS_create_node(
pathloc,
type,
- new_name,
+ new_name,
mode,
&info
);
diff --git a/cpukit/libfs/src/imfs/imfs_mount.c b/cpukit/libfs/src/imfs/imfs_mount.c
index 798ab7baa0..3ec16da3f7 100644
--- a/cpukit/libfs/src/imfs/imfs_mount.c
+++ b/cpukit/libfs/src/imfs/imfs_mount.c
@@ -1,6 +1,6 @@
/*
* IMFS_mount
- *
+ *
* This routine will look at a mount table entry that we are going to
* add to the mount table. If the mount point rtems_filesystem
* location_info_t struct refers to a node that is a directory,
@@ -39,7 +39,7 @@ int IMFS_mount(
/*
* Is the node that we are mounting onto a directory node ?
*/
-
+
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
diff --git a/cpukit/libfs/src/imfs/imfs_ntype.c b/cpukit/libfs/src/imfs/imfs_ntype.c
index 15bbe8cc3f..f80182b144 100644
--- a/cpukit/libfs/src/imfs/imfs_ntype.c
+++ b/cpukit/libfs/src/imfs/imfs_ntype.c
@@ -1,7 +1,7 @@
/*
* IMFS_node_type
*
- * The following verifies that returns the type of node that the
+ * The following verifies that returns the type of node that the
* loc refers to.
*
* COPYRIGHT (c) 1989-1999.
diff --git a/cpukit/libfs/src/imfs/imfs_readlink.c b/cpukit/libfs/src/imfs/imfs_readlink.c
index 1025947787..6b3d1acafe 100644
--- a/cpukit/libfs/src/imfs/imfs_readlink.c
+++ b/cpukit/libfs/src/imfs/imfs_readlink.c
@@ -1,7 +1,7 @@
/*
* IMFS_readlink
*
- * The following rouine puts the symblic links destination name into
+ * The following rouine puts the symblic links destination name into
* buff.
*
* COPYRIGHT (c) 1989-1999.
@@ -26,12 +26,12 @@
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
- size_t bufsize
+ size_t bufsize
)
{
IMFS_jnode_t *node;
int i;
-
+
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
diff --git a/cpukit/libfs/src/imfs/imfs_rmnod.c b/cpukit/libfs/src/imfs/imfs_rmnod.c
index 5941703238..d5e32378ad 100644
--- a/cpukit/libfs/src/imfs/imfs_rmnod.c
+++ b/cpukit/libfs/src/imfs/imfs_rmnod.c
@@ -34,12 +34,12 @@ int IMFS_rmnod(
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
- IMFS_jnode_t *the_jnode;
+ IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
- /*
- * Take the node out of the parent's chain that contains this node
+ /*
+ * Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
@@ -60,7 +60,7 @@ int IMFS_rmnod(
if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
- /*
+ /*
* Is rtems_filesystem_current this node?
*/
diff --git a/cpukit/libfs/src/imfs/imfs_stat.c b/cpukit/libfs/src/imfs/imfs_stat.c
index 4122d14774..422e954ed1 100644
--- a/cpukit/libfs/src/imfs/imfs_stat.c
+++ b/cpukit/libfs/src/imfs/imfs_stat.c
@@ -1,6 +1,6 @@
/*
* IMFS_stat
- *
+ *
* This routine provides a stat for the IMFS file system.
*
* COPYRIGHT (c) 1989-1999.
@@ -44,11 +44,11 @@ int IMFS_stat(
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
break;
-
+
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
-
+
default:
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 9ecd3ea831..38072b9f69 100644
--- a/cpukit/libfs/src/imfs/imfs_symlink.c
+++ b/cpukit/libfs/src/imfs/imfs_symlink.c
@@ -1,7 +1,7 @@
/*
* IMFS_symlink
*
- * The following rouine creates a new symbolic link node under parent
+ * The following rouine creates a new symbolic link node under parent
* with the name given in name. The node is set to point to the node at
* to_loc.
*
diff --git a/cpukit/libfs/src/imfs/imfs_unixstub.c b/cpukit/libfs/src/imfs/imfs_unixstub.c
index 47d389b7e5..d642b260d5 100644
--- a/cpukit/libfs/src/imfs/imfs_unixstub.c
+++ b/cpukit/libfs/src/imfs/imfs_unixstub.c
@@ -27,7 +27,7 @@
#include <stdio.h>
-/*
+/*
* IMFS file system operations table
*/
@@ -50,7 +50,7 @@ rtems_filesystem_operations_table IMFS_ops = {
NULL
};
-/*
+/*
* IMFS file system operations table
*/
diff --git a/cpukit/libfs/src/imfs/imfs_unlink.c b/cpukit/libfs/src/imfs/imfs_unlink.c
index e34d93dd02..b416a09b8e 100644
--- a/cpukit/libfs/src/imfs/imfs_unlink.c
+++ b/cpukit/libfs/src/imfs/imfs_unlink.c
@@ -1,6 +1,6 @@
/*
- * IMFS_unlink
- *
+ * IMFS_unlink
+ *
* Routine to remove a link node from the tree.
*
* COPYRIGHT (c) 1989-1999.
@@ -31,7 +31,7 @@ int IMFS_unlink(
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
-
+
node = loc->node_access;
/*
diff --git a/cpukit/libfs/src/imfs/imfs_unmount.c b/cpukit/libfs/src/imfs/imfs_unmount.c
index e312c9704e..ee1482bfa5 100644
--- a/cpukit/libfs/src/imfs/imfs_unmount.c
+++ b/cpukit/libfs/src/imfs/imfs_unmount.c
@@ -37,26 +37,26 @@ int IMFS_unmount(
node = mt_entry->mt_point_node.node_access;
- /*
- * Is the node that we are mounting onto a directory node ?
+ /*
+ * Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
- /*
- * Did the node indicate that there was a directory mounted here?
+ /*
+ * Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
- /*
- * Set the mt_fs pointer to indicate that there is no longer
+ /*
+ * Set the mt_fs pointer to indicate that there is no longer
* a file system mounted to this point.
*/
-
+
node->info.directory.mt_fs = NULL;
- return 0;
+ return 0;
}
diff --git a/cpukit/libfs/src/imfs/imfs_utime.c b/cpukit/libfs/src/imfs/imfs_utime.c
index f796572a94..0a120f02d3 100644
--- a/cpukit/libfs/src/imfs/imfs_utime.c
+++ b/cpukit/libfs/src/imfs/imfs_utime.c
@@ -1,7 +1,7 @@
/*
* IMFS_utime
*
- * This routine is the implementation of the utime() system
+ * This routine is the implementation of the utime() system
* call for the IMFS.
*
* COPYRIGHT (c) 1989-1999.
diff --git a/cpukit/libfs/src/imfs/ioman.c b/cpukit/libfs/src/imfs/ioman.c
index 1d0dc84953..08e56292c1 100644
--- a/cpukit/libfs/src/imfs/ioman.c
+++ b/cpukit/libfs/src/imfs/ioman.c
@@ -33,7 +33,7 @@
#define S_IFCHR __S_IFCHR
#endif
-/*
+/*
* rtems_io_register_name
*
* This assumes that all registered devices are character devices.
@@ -55,17 +55,17 @@ rtems_status_code rtems_io_register_name(
/* this is the only error returned by the old version */
if ( status )
return RTEMS_TOO_MANY;
-
+
#endif
return RTEMS_SUCCESSFUL;
}
-/*
+/*
* rtems_io_lookup_name
*
* This version is reentrant.
*
- * XXX - This is dependent upon IMFS and should not be.
+ * XXX - This is dependent upon IMFS and should not be.
* Suggest adding a filesystem routine to fill in the device_info.
*/
@@ -101,7 +101,7 @@ rtems_status_code rtems_io_lookup_name(
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
-
+
#endif
return RTEMS_SUCCESSFUL;
}
diff --git a/cpukit/libfs/src/imfs/memfile.c b/cpukit/libfs/src/imfs/memfile.c
index d5a33c97eb..531caaa1fb 100644
--- a/cpukit/libfs/src/imfs/memfile.c
+++ b/cpukit/libfs/src/imfs/memfile.c
@@ -4,7 +4,7 @@
* This file contains the set of handlers used to process operations on
* IMFS memory file nodes. The memory files are created in memory using
* malloc'ed memory. Thus any data stored in one of these files is lost
- * at system shutdown unless special arrangements to copy the data to
+ * at system shutdown unless special arrangements to copy the data to
* some type of non-volailte storage are made by the application.
*
* COPYRIGHT (c) 1989-1999.
@@ -32,10 +32,10 @@
#include <rtems/libio_.h>
#include <rtems/seterr.h>
-#define MEMFILE_STATIC
+#define MEMFILE_STATIC
/*
- * Prototypes of private routines
+ * Prototypes of private routines
*/
MEMFILE_STATIC int IMFS_memfile_extend(
@@ -268,7 +268,7 @@ int memfile_ftruncate(
* IMFS_memfile_extend
*
* This routine insures that the in-memory file is of the length
- * specified. If necessary, it will allocate memory blocks to
+ * specified. If necessary, it will allocate memory blocks to
* extend the file.
*/
@@ -431,7 +431,7 @@ void memfile_free_blocks_in_table(
}
/*
- * Now that all the blocks in the block table are free, we can
+ * Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
@@ -444,7 +444,7 @@ void memfile_free_blocks_in_table(
*
* This routine frees all memory associated with an in memory file.
*
- * NOTE: This is an exceptionally conservative implementation.
+ * NOTE: This is an exceptionally conservative implementation.
* It will check EVERY pointer which is non-NULL and insure
* any child non-NULL pointers are freed. Optimistically, all that
* is necessary is to scan until a NULL pointer is found. There
@@ -511,7 +511,7 @@ int IMFS_memfile_remove(
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
-
+
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
@@ -539,7 +539,7 @@ int IMFS_memfile_remove(
* the specified data buffer specified by destination. The file
* is NOT extended. An offset greater than the length of the file
* is considered an error. Read from an offset for more bytes than
- * are between the offset and the end of the file will result in
+ * are between the offset and the end of the file will result in
* reading the data between offset and the end of the file (truncated
* read).
*/
@@ -962,7 +962,7 @@ fflush(stdout);
return 0;
p = (block_p *)p[ doubly ];
- if ( !p )
+ if ( !p )
return 0;
#if 0
@@ -1083,7 +1083,7 @@ fflush(stdout);
/*
* memfile_rmnod
*
- * This routine is available from the optable to remove a node
+ * This routine is available from the optable to remove a node
* from the IMFS file system.
*/
@@ -1091,12 +1091,12 @@ int memfile_rmnod(
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
- IMFS_jnode_t *the_jnode;
+ IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
- /*
- * Take the node out of the parent's chain that contains this node
+ /*
+ * Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
@@ -1123,7 +1123,7 @@ int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){
if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
- /*
+ /*
* Is the rtems_filesystem_current is this node?
*/