diff options
author | Ryan Long <ryan.long@oarcorp.com> | 2021-04-30 13:14:48 -0400 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2021-05-28 14:27:40 -0500 |
commit | ea41722c92313e884368106832d3454114ba88b3 (patch) | |
tree | 9e7145c88aec146e45a2b6f8040f8767b56629f9 /cpukit/libfs/src/dosfs/msdos_init.c | |
parent | psx13: Added tests for utimensat() and futimens() (diff) | |
download | rtems-ea41722c92313e884368106832d3454114ba88b3.tar.bz2 |
Change filesystem utime_h handler to utimens_h
Also updated licenses.
Closes #4400
Updates #3899
Diffstat (limited to 'cpukit/libfs/src/dosfs/msdos_init.c')
-rw-r--r-- | cpukit/libfs/src/dosfs/msdos_init.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/cpukit/libfs/src/dosfs/msdos_init.c b/cpukit/libfs/src/dosfs/msdos_init.c index 67b16b64ed..a96b973cba 100644 --- a/cpukit/libfs/src/dosfs/msdos_init.c +++ b/cpukit/libfs/src/dosfs/msdos_init.c @@ -36,18 +36,17 @@ static int msdos_clone_node_info(rtems_filesystem_location_info_t *loc) return fat_file_reopen(fat_fd); } -static int msdos_utime( +static int msdos_utimens( const rtems_filesystem_location_info_t *loc, - time_t actime, - time_t modtime + struct timespec times[2] ) { fat_file_fd_t *fat_fd = loc->node_access; - if (actime != modtime) + if (times[0].tv_sec != times[1].tv_sec) rtems_set_errno_and_return_minus_one( ENOTSUP ); - fat_file_set_mtime(fat_fd, modtime); + fat_file_set_mtime(fat_fd, times[1].tv_sec); return RC_OK; } @@ -67,7 +66,7 @@ const rtems_filesystem_operations_table msdos_ops = { .mount_h = rtems_filesystem_default_mount, .unmount_h = rtems_filesystem_default_unmount, .fsunmount_me_h = msdos_shut_down, - .utime_h = msdos_utime, + .utimens_h = msdos_utimens, .symlink_h = rtems_filesystem_default_symlink, .readlink_h = rtems_filesystem_default_readlink, .rename_h = msdos_rename, |