diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-05-23 15:41:04 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-05-23 15:41:04 +0000 |
commit | 7c1a82facd6bd7eb884ebc3747d8bae633f73180 (patch) | |
tree | bf3b90802a0a4c78fa27e76b9f3da446452397cf /c | |
parent | Added routines addr2ascii.c and ascii2addr.c even though they (diff) | |
download | rtems-7c1a82facd6bd7eb884ebc3747d8bae633f73180.tar.bz2 |
Patch from Jennifer Averett <jennifer.averett@oarcorp.com> to make
this C++ safe.
Diffstat (limited to 'c')
-rw-r--r-- | c/src/lib/libc/imfs.h | 26 | ||||
-rw-r--r-- | c/src/lib/libc/imfs_chown.c | 6 | ||||
-rw-r--r-- | c/src/lib/libc/imfs_creat.c | 20 | ||||
-rw-r--r-- | c/src/lib/libc/imfs_directory.c | 20 | ||||
-rw-r--r-- | c/src/lib/libc/imfs_eval.c | 10 | ||||
-rw-r--r-- | c/src/lib/libc/imfs_fchmod.c | 6 | ||||
-rw-r--r-- | c/src/lib/libc/imfs_initsupp.c | 2 | ||||
-rw-r--r-- | c/src/lib/libc/imfs_link.c | 4 | ||||
-rw-r--r-- | c/src/lib/libc/imfs_rmnod.c | 4 | ||||
-rw-r--r-- | c/src/lib/libc/imfs_stat.c | 18 | ||||
-rw-r--r-- | c/src/lib/libc/imfs_unlink.c | 4 | ||||
-rw-r--r-- | c/src/lib/libc/imfs_utime.c | 4 | ||||
-rw-r--r-- | c/src/lib/libc/memfile.c | 4 |
13 files changed, 64 insertions, 64 deletions
diff --git a/c/src/lib/libc/imfs.h b/c/src/lib/libc/imfs.h index 8ebfadf8cc..38c770a325 100644 --- a/c/src/lib/libc/imfs.h +++ b/c/src/lib/libc/imfs.h @@ -150,16 +150,16 @@ struct IMFS_jnode_tt { Chain_Node Node; /* for chaining them together */ IMFS_jnode_t *Parent; /* Parent node */ char name[IMFS_NAME_MAX+1]; /* "basename" */ - mode_t stat_mode; /* File mode */ - nlink_t stat_nlink; /* Link count */ - ino_t stat_ino; /* inode */ + mode_t st_mode; /* File mode */ + nlink_t st_nlink; /* Link count */ + ino_t st_ino; /* inode */ - uid_t stat_uid; /* User ID of owner */ - gid_t stat_gid; /* Group ID of owner */ + uid_t st_uid; /* User ID of owner */ + gid_t st_gid; /* Group ID of owner */ - time_t stat_atime; /* Time of last access */ - time_t stat_mtime; /* Time of last modification */ - time_t stat_ctime; /* Time of last status change */ + time_t st_atime; /* Time of last access */ + time_t st_mtime; /* Time of last modification */ + time_t st_ctime; /* Time of last status change */ IMFS_jnode_types_t type; /* Type of this entry */ IMFS_types_union info; }; @@ -168,29 +168,29 @@ struct IMFS_jnode_tt { do { \ struct timeval tv; \ gettimeofday( &tv, 0 ); \ - _jnode->stat_atime = (time_t) tv.tv_sec; \ + _jnode->st_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; \ + _jnode->st_mtime = (time_t) tv.tv_sec; \ } while (0) #define IMFS_update_ctime( _jnode ) \ do { \ struct timeval tv; \ gettimeofday( &tv, 0 ); \ - _jnode->stat_ctime = (time_t) tv.tv_sec; \ + _jnode->st_ctime = (time_t) tv.tv_sec; \ } while (0) #define IMFS_atime_mtime_update( _jnode ) \ do { \ struct timeval tv; \ gettimeofday( &tv, 0 ); \ - _jnode->stat_mtime = (time_t) tv.tv_sec; \ - _jnode->stat_atime = (time_t) tv.tv_sec; \ + _jnode->st_mtime = (time_t) tv.tv_sec; \ + _jnode->st_atime = (time_t) tv.tv_sec; \ } while (0) typedef struct { diff --git a/c/src/lib/libc/imfs_chown.c b/c/src/lib/libc/imfs_chown.c index 000992b188..d9e8f40e7f 100644 --- a/c/src/lib/libc/imfs_chown.c +++ b/c/src/lib/libc/imfs_chown.c @@ -38,12 +38,12 @@ int IMFS_chown( #if defined(RTEMS_POSIX_API) st_uid = geteuid(); - if ( ( st_uid != jnode->stat_uid ) && ( st_uid != 0 ) ) + if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) set_errno_and_return_minus_one( EPERM ); #endif - jnode->stat_uid = owner; - jnode->stat_gid = group; + jnode->st_uid = owner; + jnode->st_gid = group; IMFS_update_ctime( jnode ); diff --git a/c/src/lib/libc/imfs_creat.c b/c/src/lib/libc/imfs_creat.c index a815c93fcc..227b5f9300 100644 --- a/c/src/lib/libc/imfs_creat.c +++ b/c/src/lib/libc/imfs_creat.c @@ -48,7 +48,7 @@ IMFS_jnode_t *IMFS_create_node( * Fill in the basic information */ - node->stat_nlink = 1; + node->st_nlink = 1; node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); @@ -56,14 +56,14 @@ IMFS_jnode_t *IMFS_create_node( * Fill in the mode and permission information for the jnode structure. */ - node->stat_mode = mode & ~rtems_filesystem_umask; + node->st_mode = mode & ~rtems_filesystem_umask; #if defined(RTEMS_POSIX_API) - node->stat_uid = geteuid(); - node->stat_gid = getegid(); + node->st_uid = geteuid(); + node->st_gid = getegid(); #else - node->stat_uid = 0; - node->stat_gid = 0; + node->st_uid = 0; + node->st_gid = 0; #endif /* @@ -72,9 +72,9 @@ IMFS_jnode_t *IMFS_create_node( gettimeofday( &tv, 0 ); - node->stat_atime = (time_t) tv.tv_sec; - node->stat_mtime = (time_t) tv.tv_sec; - node->stat_ctime = (time_t) tv.tv_sec; + node->st_atime = (time_t) tv.tv_sec; + node->st_mtime = (time_t) tv.tv_sec; + node->st_ctime = (time_t) tv.tv_sec; /* * Set the type specific information @@ -121,7 +121,7 @@ IMFS_jnode_t *IMFS_create_node( node->Parent = parent; fs_info = parent_loc->mt_entry->fs_info; - node->stat_ino = ++fs_info->ino_count; + node->st_ino = ++fs_info->ino_count; } diff --git a/c/src/lib/libc/imfs_directory.c b/c/src/lib/libc/imfs_directory.c index be6998f253..1f6d9b5ff5 100644 --- a/c/src/lib/libc/imfs_directory.c +++ b/c/src/lib/libc/imfs_directory.c @@ -240,17 +240,17 @@ int imfs_dir_fstat( the_jnode = (IMFS_jnode_t *) loc->node_access; buf->st_dev = 0ll; - buf->st_ino = the_jnode->stat_ino; - buf->st_mode = the_jnode->stat_mode; - buf->st_nlink = the_jnode->stat_nlink; - buf->st_uid = the_jnode->stat_uid; - buf->st_gid = the_jnode->stat_gid; + buf->st_ino = the_jnode->st_ino; + buf->st_mode = the_jnode->st_mode; + buf->st_nlink = the_jnode->st_nlink; + buf->st_uid = the_jnode->st_uid; + buf->st_gid = the_jnode->st_gid; buf->st_rdev = 0ll; buf->st_blksize = 0; buf->st_blocks = 0; - buf->st_atime = the_jnode->stat_atime; - buf->st_mtime = the_jnode->stat_mtime; - buf->st_ctime = the_jnode->stat_ctime; + buf->st_atime = the_jnode->st_atime; + buf->st_mtime = the_jnode->st_mtime; + buf->st_ctime = the_jnode->st_ctime; buf->st_size = 0; @@ -317,14 +317,14 @@ int imfs_dir_rmnod( * Decrement the link counter and see if we can free the space. */ - the_jnode->stat_nlink--; + the_jnode->st_nlink--; IMFS_update_ctime( the_jnode ); /* * The file cannot be open and the link must be less than 1 to free. */ - if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->stat_nlink < 1) ) { + if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { /* * Is the rtems_filesystem_current is this node? diff --git a/c/src/lib/libc/imfs_eval.c b/c/src/lib/libc/imfs_eval.c index b58a2028c2..1f1e7c6daf 100644 --- a/c/src/lib/libc/imfs_eval.c +++ b/c/src/lib/libc/imfs_eval.c @@ -82,8 +82,8 @@ int IMFS_evaluate_permission( st_uid = geteuid(); st_gid = getegid(); #else - st_uid = jnode->stat_uid; - st_gid = jnode->stat_gid; + st_uid = jnode->st_uid; + st_gid = jnode->st_gid; #endif /* @@ -92,9 +92,9 @@ int IMFS_evaluate_permission( flags_to_test = flags; - if ( st_uid == jnode->stat_uid ) + if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; - else if ( st_gid == jnode->stat_gid ) + else if ( st_gid == jnode->st_gid ) flags_to_test <<= 3; else /* must be other - do nothing */; @@ -103,7 +103,7 @@ int IMFS_evaluate_permission( * If all of the flags are set we have permission * to do this. */ - if ( ( flags_to_test & jnode->stat_mode) == flags_to_test ) + if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; diff --git a/c/src/lib/libc/imfs_fchmod.c b/c/src/lib/libc/imfs_fchmod.c index ae7fd12555..b766ed74dc 100644 --- a/c/src/lib/libc/imfs_fchmod.c +++ b/c/src/lib/libc/imfs_fchmod.c @@ -34,7 +34,7 @@ int IMFS_fchmod( #if defined(RTEMS_POSIX_API) st_uid = geteuid(); - if ( ( st_uid != jnode->stat_uid ) && ( st_uid != 0 ) ) + if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) set_errno_and_return_minus_one( EPERM ); #endif @@ -44,8 +44,8 @@ int IMFS_fchmod( if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) ) set_errno_and_return_minus_one( EPERM ); - jnode->stat_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO); - jnode->stat_mode |= mode; + jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO); + jnode->st_mode |= mode; IMFS_update_ctime( jnode ); diff --git a/c/src/lib/libc/imfs_initsupp.c b/c/src/lib/libc/imfs_initsupp.c index c17be9fdec..408789760e 100644 --- a/c/src/lib/libc/imfs_initsupp.c +++ b/c/src/lib/libc/imfs_initsupp.c @@ -74,7 +74,7 @@ int IMFS_initialize_support( fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; - jnode->stat_ino = fs_info->ino_count; + jnode->st_ino = fs_info->ino_count; return 0; } diff --git a/c/src/lib/libc/imfs_link.c b/c/src/lib/libc/imfs_link.c index c976b326a8..6a8fa3c3ef 100644 --- a/c/src/lib/libc/imfs_link.c +++ b/c/src/lib/libc/imfs_link.c @@ -35,7 +35,7 @@ int IMFS_link( */ info.hard_link.link_node = to_loc->node_access; - if ( info.hard_link.link_node->stat_nlink >= LINK_MAX ) + if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) set_errno_and_return_minus_one( EMLINK ); /* @@ -63,7 +63,7 @@ int IMFS_link( * Increment the link count of the node being pointed to. */ - info.hard_link.link_node->stat_nlink++; + info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; diff --git a/c/src/lib/libc/imfs_rmnod.c b/c/src/lib/libc/imfs_rmnod.c index fd39f78734..3b875145da 100644 --- a/c/src/lib/libc/imfs_rmnod.c +++ b/c/src/lib/libc/imfs_rmnod.c @@ -45,14 +45,14 @@ int IMFS_rmnod( * Decrement the link counter and see if we can free the space. */ - the_jnode->stat_nlink--; + the_jnode->st_nlink--; IMFS_update_ctime( the_jnode ); /* * The file cannot be open and the link must be less than 1 to free. */ - if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->stat_nlink < 1) ) { + if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { /* * Is rtems_filesystem_current this node? diff --git a/c/src/lib/libc/imfs_stat.c b/c/src/lib/libc/imfs_stat.c index ad0ad8a635..2edc1a9e9b 100644 --- a/c/src/lib/libc/imfs_stat.c +++ b/c/src/lib/libc/imfs_stat.c @@ -44,15 +44,15 @@ int IMFS_stat( break; } - buf->st_mode = the_jnode->stat_mode; - buf->st_nlink = the_jnode->stat_nlink; - buf->st_ino = the_jnode->stat_ino; - buf->st_uid = the_jnode->stat_uid; - buf->st_gid = the_jnode->stat_gid; - - buf->st_atime = the_jnode->stat_atime; - buf->st_mtime = the_jnode->stat_mtime; - buf->st_ctime = the_jnode->stat_ctime; + buf->st_mode = the_jnode->st_mode; + buf->st_nlink = the_jnode->st_nlink; + buf->st_ino = the_jnode->st_ino; + buf->st_uid = the_jnode->st_uid; + buf->st_gid = the_jnode->st_gid; + + buf->st_atime = the_jnode->st_atime; + buf->st_mtime = the_jnode->st_mtime; + buf->st_ctime = the_jnode->st_ctime; return 0; } diff --git a/c/src/lib/libc/imfs_unlink.c b/c/src/lib/libc/imfs_unlink.c index bfd067fa30..f001c6450d 100644 --- a/c/src/lib/libc/imfs_unlink.c +++ b/c/src/lib/libc/imfs_unlink.c @@ -53,9 +53,9 @@ int IMFS_unlink( * to remove the node that is a link and the node itself. */ - node->info.hard_link.link_node->stat_nlink --; + node->info.hard_link.link_node->st_nlink --; IMFS_update_ctime( node->info.hard_link.link_node ); - if ( node->info.hard_link.link_node->stat_nlink < 1) { + if ( node->info.hard_link.link_node->st_nlink < 1) { result = (*the_link.handlers->rmnod)( &the_link ); if ( result != 0 ) return -1; diff --git a/c/src/lib/libc/imfs_utime.c b/c/src/lib/libc/imfs_utime.c index c9bd9ddd90..e20d352c50 100644 --- a/c/src/lib/libc/imfs_utime.c +++ b/c/src/lib/libc/imfs_utime.c @@ -30,8 +30,8 @@ int IMFS_utime( the_jnode = (IMFS_jnode_t *) pathloc->node_access; - the_jnode->stat_atime = actime; - the_jnode->stat_mtime = modtime; + the_jnode->st_atime = actime; + the_jnode->st_mtime = modtime; return 0; } diff --git a/c/src/lib/libc/memfile.c b/c/src/lib/libc/memfile.c index 1d8018ecd6..dad120a0a7 100644 --- a/c/src/lib/libc/memfile.c +++ b/c/src/lib/libc/memfile.c @@ -1064,14 +1064,14 @@ int memfile_rmnod( * Decrement the link counter and see if we can free the space. */ - the_jnode->stat_nlink--; + the_jnode->st_nlink--; IMFS_update_ctime( the_jnode ); /* * The file cannot be open and the link must be less than 1 to free. */ - if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->stat_nlink < 1) ) { + if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { /* * Is the rtems_filesystem_current is this node? |