[rtems commit] imfs: Use _IMFS_get_time()
Sebastian Huber
sebh at rtems.org
Mon Mar 9 17:59:54 UTC 2020
Module: rtems
Branch: master
Commit: 85c9145f09c3d221cec13922b5507818654b3c2e
Changeset: http://git.rtems.org/rtems/commit/?id=85c9145f09c3d221cec13922b5507818654b3c2e
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Mar 5 21:32:29 2020 +0100
imfs: Use _IMFS_get_time()
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 c6a4b4b..db4799c 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 );
}
More information about the vc
mailing list