[PATCH 1/5] imfs: Use _IMFS_get_time()
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Mar 6 06:47:56 UTC 2020
Update #3894.
---
cpukit/libfs/src/imfs/imfs_node.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/cpukit/libfs/src/imfs/imfs_node.c b/cpukit/libfs/src/imfs/imfs_node.c
index c6a4b4bd4e..db4799ce94 100644
--- a/cpukit/libfs/src/imfs/imfs_node.c
+++ b/cpukit/libfs/src/imfs/imfs_node.c
@@ -32,7 +32,7 @@ IMFS_jnode_t *IMFS_initialize_node(
void *arg
)
{
- struct timeval tv;
+ time_t now;
if ( namelen > IMFS_NAME_MAX ) {
errno = ENAMETOOLONG;
@@ -40,8 +40,6 @@ IMFS_jnode_t *IMFS_initialize_node(
return NULL;
}
- gettimeofday( &tv, 0 );
-
/*
* Fill in the basic information
*/
@@ -62,9 +60,10 @@ IMFS_jnode_t *IMFS_initialize_node(
* Now set all the times.
*/
- node->stat_atime = (time_t) tv.tv_sec;
- node->stat_mtime = (time_t) tv.tv_sec;
- node->stat_ctime = (time_t) tv.tv_sec;
+ now = _IMFS_get_time();
+ node->stat_atime = now;
+ node->stat_mtime = now;
+ node->stat_ctime = now;
return (*node_control->node_initialize)( node, arg );
}
--
2.16.4
More information about the devel
mailing list