Changed st_atime, st_ctime, and st_mtime for IMFS nodes to be

stat_ to avoid conflicts with macros on Solaris.
This commit is contained in:
Joel Sherrill
2000-06-12 14:09:52 +00:00
parent f981326efc
commit 531cbf9a4a
5 changed files with 22 additions and 22 deletions

View File

@@ -157,9 +157,9 @@ struct IMFS_jnode_tt {
uid_t st_uid; /* User ID of owner */
gid_t st_gid; /* Group ID of owner */
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 */
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 */
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->st_atime = (time_t) tv.tv_sec; \
_jnode->stat_atime = (time_t) tv.tv_sec; \
} while (0)
#define IMFS_update_mtime( _jnode ) \
do { \
struct timeval tv; \
gettimeofday( &tv, 0 ); \
_jnode->st_mtime = (time_t) tv.tv_sec; \
_jnode->stat_mtime = (time_t) tv.tv_sec; \
} while (0)
#define IMFS_update_ctime( _jnode ) \
do { \
struct timeval tv; \
gettimeofday( &tv, 0 ); \
_jnode->st_ctime = (time_t) tv.tv_sec; \
_jnode->stat_ctime = (time_t) tv.tv_sec; \
} while (0)
#define IMFS_atime_mtime_update( _jnode ) \
do { \
struct timeval tv; \
gettimeofday( &tv, 0 ); \
_jnode->st_mtime = (time_t) tv.tv_sec; \
_jnode->st_atime = (time_t) tv.tv_sec; \
_jnode->stat_mtime = (time_t) tv.tv_sec; \
_jnode->stat_atime = (time_t) tv.tv_sec; \
} while (0)
typedef struct {

View File

@@ -72,9 +72,9 @@ IMFS_jnode_t *IMFS_create_node(
gettimeofday( &tv, 0 );
node->st_atime = (time_t) tv.tv_sec;
node->st_mtime = (time_t) tv.tv_sec;
node->st_ctime = (time_t) tv.tv_sec;
node->stat_atime = (time_t) tv.tv_sec;
node->stat_mtime = (time_t) tv.tv_sec;
node->stat_ctime = (time_t) tv.tv_sec;
/*
* Set the type specific information

View File

@@ -219,9 +219,9 @@ int imfs_dir_lseek(
* dirent structure
* st_blksize 0
* st_blocks 0
* st_atime time of last access
* st_mtime time of last modification
* st_ctime time of the last change
* stat_atime time of last access
* stat_mtime time of last modification
* stat_ctime time of the last change
*
* This information will be returned to the calling function in a -stat- struct
*
@@ -248,9 +248,9 @@ int imfs_dir_fstat(
buf->st_rdev = 0ll;
buf->st_blksize = 0;
buf->st_blocks = 0;
buf->st_atime = the_jnode->st_atime;
buf->st_mtime = the_jnode->st_mtime;
buf->st_ctime = the_jnode->st_ctime;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
buf->st_size = 0;

View File

@@ -50,9 +50,9 @@ int IMFS_stat(
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;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}

View File

@@ -30,8 +30,8 @@ int IMFS_utime(
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
the_jnode->st_atime = actime;
the_jnode->st_mtime = modtime;
the_jnode->stat_atime = actime;
the_jnode->stat_mtime = modtime;
return 0;
}