summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/jffs2/src/fs-rtems.c
diff options
context:
space:
mode:
authorRyan Long <ryan.long@oarcorp.com>2021-04-30 13:14:48 -0400
committerJoel Sherrill <joel@rtems.org>2021-05-28 14:27:40 -0500
commitea41722c92313e884368106832d3454114ba88b3 (patch)
tree9e7145c88aec146e45a2b6f8040f8767b56629f9 /cpukit/libfs/src/jffs2/src/fs-rtems.c
parentpsx13: Added tests for utimensat() and futimens() (diff)
downloadrtems-ea41722c92313e884368106832d3454114ba88b3.tar.bz2
Change filesystem utime_h handler to utimens_h
Also updated licenses. Closes #4400 Updates #3899
Diffstat (limited to 'cpukit/libfs/src/jffs2/src/fs-rtems.c')
-rw-r--r--cpukit/libfs/src/jffs2/src/fs-rtems.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/cpukit/libfs/src/jffs2/src/fs-rtems.c b/cpukit/libfs/src/jffs2/src/fs-rtems.c
index aae208ccef..8bc3d85cc3 100644
--- a/cpukit/libfs/src/jffs2/src/fs-rtems.c
+++ b/cpukit/libfs/src/jffs2/src/fs-rtems.c
@@ -1118,10 +1118,9 @@ static int rtems_jffs2_statvfs(
return 0;
}
-static int rtems_jffs2_utime(
+static int rtems_jffs2_utimens(
const rtems_filesystem_location_info_t *loc,
- time_t actime,
- time_t modtime
+ struct timespec times[2]
)
{
struct _inode *inode = rtems_jffs2_get_inode_by_location(loc);
@@ -1129,8 +1128,8 @@ static int rtems_jffs2_utime(
int eno;
iattr.ia_valid = ATTR_ATIME | ATTR_MTIME | ATTR_CTIME;
- iattr.ia_atime = actime;
- iattr.ia_mtime = modtime;
+ iattr.ia_atime = times[0].tv_sec;
+ iattr.ia_mtime = times[1].tv_sec;
iattr.ia_ctime = get_seconds();
eno = -jffs2_do_setattr(inode, &iattr);
@@ -1186,7 +1185,7 @@ static const rtems_filesystem_operations_table rtems_jffs2_ops = {
.mount_h = rtems_filesystem_default_mount,
.unmount_h = rtems_filesystem_default_unmount,
.fsunmount_me_h = rtems_jffs2_fsunmount,
- .utime_h = rtems_jffs2_utime,
+ .utimens_h = rtems_jffs2_utimens,
.symlink_h = rtems_jffs2_symlink,
.readlink_h = rtems_jffs2_readlink,
.rename_h = rtems_jffs2_rename,