diff options
author | Chris Johns <chrisj@rtems.org> | 2008-07-03 01:37:38 +0000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2008-07-03 01:37:38 +0000 |
commit | 72d2ec4da4ea788335adf921faebf0ac96d67c93 (patch) | |
tree | f50017188d1482928932df90c96985a0748616cd /cpukit/libfs/src/imfs | |
parent | 2008-07-03 Chris Johns <chrisj@rtems.org> (diff) | |
download | rtems-72d2ec4da4ea788335adf921faebf0ac96d67c93.tar.bz2 |
2008-07-03 Chris Johns <chrisj@rtems.org>
* cpukit/libcsupport/include/chain.h: Removed. Use the SAPI
interface that is supported.
* cpukit/libcsupport/Makefile.am,
cpukit/libcsupport/preinstall.am: Remove chain.h header
references.
* cpukit/sapi/include/rtems/chain.h,
cpukit/sapi/inline/rtems/chain.inl: New. A supported chains
interface.
* cpukit/sapi/Makefile.am, cpukit/sapi/preinstall.am: Updated to
include the new chains interface.
* cpukit/libfs/src/imfs/imfs.h,
cpukit/libfs/src/imfs/imfs_creat.c,
cpukit/libfs/src/imfs/imfs_debug.c,
cpukit/libfs/src/imfs/imfs_directory.c,
cpukit/libfs/src/imfs/imfs_fsunmount.c,
cpukit/libfs/src/imfs/imfs_getchild.c,
cpukit/libfs/src/imfs/imfs_load_tar.c,
cpukit/libfs/src/imfs/imfs_rmnod.c,
cpukit/libfs/src/imfs/memfile.c,
cpukit/libfs/src/nfsclient/src/nfs.c,
cpukit/libcsupport/include/rtems/libio.h,
cpukit/libcsupport/src/malloc_deferred.c,
cpukit/libcsupport/src/mount.c,
cpukit/libcsupport/src/privateenv.c,
cpukit/libcsupport/src/unmount.c: Change to the new chains
interface.
* cpukit/libcsupport/src/malloc_boundary.c: Remove warning.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libfs/src/imfs/imfs.h | 4 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_creat.c | 4 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_debug.c | 6 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_directory.c | 32 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_fsunmount.c | 4 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_getchild.c | 8 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_load_tar.c | 1 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_rmnod.c | 4 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/memfile.c | 2 |
9 files changed, 32 insertions, 33 deletions
diff --git a/cpukit/libfs/src/imfs/imfs.h b/cpukit/libfs/src/imfs/imfs.h index ae1839b3f7..6f872e507c 100644 --- a/cpukit/libfs/src/imfs/imfs.h +++ b/cpukit/libfs/src/imfs/imfs.h @@ -42,7 +42,7 @@ struct IMFS_jnode_tt; typedef struct IMFS_jnode_tt IMFS_jnode_t; typedef struct { - Chain_Control Entries; + rtems_chain_control Entries; rtems_filesystem_mount_table_entry_t *mt_fs; } IMFS_directory_t; @@ -158,7 +158,7 @@ typedef union { */ struct IMFS_jnode_tt { - Chain_Node Node; /* for chaining them together */ + rtems_chain_node Node; /* for chaining them together */ IMFS_jnode_t *Parent; /* Parent node */ char name[IMFS_NAME_MAX+1]; /* "basename" */ mode_t st_mode; /* File mode */ diff --git a/cpukit/libfs/src/imfs/imfs_creat.c b/cpukit/libfs/src/imfs/imfs_creat.c index 1eaea0b384..ccf88bdf64 100644 --- a/cpukit/libfs/src/imfs/imfs_creat.c +++ b/cpukit/libfs/src/imfs/imfs_creat.c @@ -85,7 +85,7 @@ IMFS_jnode_t *IMFS_create_node( switch (type) { case IMFS_DIRECTORY: - Chain_Initialize_empty(&node->info.directory.Entries); + rtems_chain_initialize_empty(&node->info.directory.Entries); break; case IMFS_HARD_LINK: @@ -122,7 +122,7 @@ IMFS_jnode_t *IMFS_create_node( */ if ( parent ) { - Chain_Append( &parent->info.directory.Entries, &node->Node ); + rtems_chain_append( &parent->info.directory.Entries, &node->Node ); node->Parent = parent; fs_info = parent_loc->mt_entry->fs_info; diff --git a/cpukit/libfs/src/imfs/imfs_debug.c b/cpukit/libfs/src/imfs/imfs_debug.c index 8b53aea1d6..d766c5e8b1 100644 --- a/cpukit/libfs/src/imfs/imfs_debug.c +++ b/cpukit/libfs/src/imfs/imfs_debug.c @@ -119,8 +119,8 @@ void IMFS_dump_directory( int level ) { - Chain_Node *the_node; - Chain_Control *the_chain; + rtems_chain_node *the_node; + rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; @@ -133,7 +133,7 @@ void IMFS_dump_directory( the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; - !_Chain_Is_tail( the_chain, the_node ); + !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; diff --git a/cpukit/libfs/src/imfs/imfs_directory.c b/cpukit/libfs/src/imfs/imfs_directory.c index 6f7c889d59..fd3988b59e 100644 --- a/cpukit/libfs/src/imfs/imfs_directory.c +++ b/cpukit/libfs/src/imfs/imfs_directory.c @@ -82,19 +82,19 @@ ssize_t imfs_dir_read( * Read up to element iop->offset in the directory chain of the * imfs_jnode_t struct for this file descriptor. */ - Chain_Node *the_node; - Chain_Control *the_chain; - IMFS_jnode_t *the_jnode; - int bytes_transferred; - int current_entry; - int first_entry; - int last_entry; - struct dirent tmp_dirent; + rtems_chain_node *the_node; + rtems_chain_control *the_chain; + IMFS_jnode_t *the_jnode; + int bytes_transferred; + int current_entry; + int first_entry; + int last_entry; + struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; the_chain = &the_jnode->info.directory.Entries; - if ( Chain_Is_empty( the_chain ) ) + if ( rtems_chain_is_empty( the_chain ) ) return 0; /* Move to the first of the desired directory entries */ @@ -112,7 +112,7 @@ ssize_t imfs_dir_read( current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ - if ( Chain_Is_tail( the_chain, the_node ) ){ + if ( rtems_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 */ @@ -238,9 +238,9 @@ int imfs_dir_fstat( struct stat *buf ) { - Chain_Node *the_node; - Chain_Control *the_chain; - IMFS_jnode_t *the_jnode; + rtems_chain_node *the_node; + rtems_chain_control *the_chain; + IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) loc->node_access; @@ -265,7 +265,7 @@ int imfs_dir_fstat( /* Run through the chain and count the number of directory entries */ /* that are subordinate to this directory node */ for ( the_node = the_chain->first ; - !_Chain_Is_tail( the_chain, the_node ) ; + !rtems_chain_is_tail( the_chain, the_node ) ; the_node = the_node->next ) { buf->st_size = buf->st_size + sizeof( struct dirent ); @@ -293,7 +293,7 @@ int imfs_dir_rmnod( * You cannot remove a node that still has children */ - if ( ! Chain_Is_empty( &the_jnode->info.directory.Entries ) ) + if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); /* @@ -315,7 +315,7 @@ int imfs_dir_rmnod( */ if ( the_jnode->Parent != NULL ) { - Chain_Extract( (Chain_Node *) the_jnode ); + rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; } diff --git a/cpukit/libfs/src/imfs/imfs_fsunmount.c b/cpukit/libfs/src/imfs/imfs_fsunmount.c index c87b2e665b..c3a12efb14 100644 --- a/cpukit/libfs/src/imfs/imfs_fsunmount.c +++ b/cpukit/libfs/src/imfs/imfs_fsunmount.c @@ -37,13 +37,13 @@ (&jnode->info.directory.Entries) #define jnode_has_no_children( jnode ) \ - Chain_Is_empty( jnode_get_control( jnode ) ) + rtems_chain_is_empty( jnode_get_control( jnode ) ) #define jnode_has_children( jnode ) \ ( ! jnode_has_no_children( jnode ) ) #define jnode_get_first_child( jnode ) \ - ((IMFS_jnode_t *)( Chain_Head( jnode_get_control( jnode ) )->next)) + ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry diff --git a/cpukit/libfs/src/imfs/imfs_getchild.c b/cpukit/libfs/src/imfs/imfs_getchild.c index 0c29516dd7..2b47ba2714 100644 --- a/cpukit/libfs/src/imfs/imfs_getchild.c +++ b/cpukit/libfs/src/imfs/imfs_getchild.c @@ -30,9 +30,9 @@ IMFS_jnode_t *IMFS_find_match_in_dir( char *name ) { - Chain_Node *the_node; - Chain_Control *the_chain; - IMFS_jnode_t *the_jnode; + rtems_chain_node *the_node; + rtems_chain_control *the_chain; + IMFS_jnode_t *the_jnode; /* * Check for fatal errors. A NULL directory show a problem in the @@ -60,7 +60,7 @@ IMFS_jnode_t *IMFS_find_match_in_dir( the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; - !_Chain_Is_tail( the_chain, the_node ); + !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; diff --git a/cpukit/libfs/src/imfs/imfs_load_tar.c b/cpukit/libfs/src/imfs/imfs_load_tar.c index e229f3be67..0846f2e1ee 100644 --- a/cpukit/libfs/src/imfs/imfs_load_tar.c +++ b/cpukit/libfs/src/imfs/imfs_load_tar.c @@ -22,7 +22,6 @@ #include <rtems.h> #include <rtems/libio_.h> -#include <rtems/chain.h> #include <rtems/imfs.h> #include <rtems/untar.h> #include <rtems/tar.h> diff --git a/cpukit/libfs/src/imfs/imfs_rmnod.c b/cpukit/libfs/src/imfs/imfs_rmnod.c index f37cb6d23c..85202b2c87 100644 --- a/cpukit/libfs/src/imfs/imfs_rmnod.c +++ b/cpukit/libfs/src/imfs/imfs_rmnod.c @@ -43,7 +43,7 @@ int IMFS_rmnod( */ if ( the_jnode->Parent != NULL ) { - Chain_Extract( (Chain_Node *) the_jnode ); + rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; } @@ -73,7 +73,7 @@ int IMFS_rmnod( if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) - free( the_jnode->info.sym_link.name ); + free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); } diff --git a/cpukit/libfs/src/imfs/memfile.c b/cpukit/libfs/src/imfs/memfile.c index 799715f06c..2391373acb 100644 --- a/cpukit/libfs/src/imfs/memfile.c +++ b/cpukit/libfs/src/imfs/memfile.c @@ -1117,7 +1117,7 @@ int memfile_rmnod( */ if ( the_jnode->Parent != NULL ) { - Chain_Extract( (Chain_Node *) the_jnode ); + rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; } |