<div dir="ltr"><div>As a warning, this and the corresponding libbsd patch are queued </div><div>behind an RSB patch to get UTIME_NOW and UTIME_OMIT in</div><div>newlib. That patch was merged into newlib. Then the RTEMS </div><div>*utime* patch set and these two will go in at the same time. Otherwise,</div><div>there will be breakage.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 21, 2021 at 9:26 AM Gedare Bloom <<a href="mailto:gedare@rtems.org">gedare@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, May 3, 2021 at 12:41 PM Ryan Long <<a href="mailto:ryan.long@oarcorp.com" target="_blank">ryan.long@oarcorp.com</a>> wrote:<br>
><br>
> Changed nfs_utime() to nfs_utimens(), changed the arguments to use<br>
> a timespec array instead of individual variables for access and<br>
> modified time.<br>
><br>
> Updates #4400<br>
> ---<br>
>  nfsclient/src/nfs.c | 50 +++++++++++++++++++++++++-------------------------<br>
>  1 file changed, 25 insertions(+), 25 deletions(-)<br>
><br>
> diff --git a/nfsclient/src/nfs.c b/nfsclient/src/nfs.c<br>
> index bc9a2c6..72fefb9 100644<br>
> --- a/nfsclient/src/nfs.c<br>
> +++ b/nfsclient/src/nfs.c<br>
> @@ -2050,19 +2050,19 @@ static int nfs_rmnod(<br>
>  Â  Â  Â  Â return rv;<br>
>  }<br>
><br>
> -static int nfs_utime(<br>
> +static int nfs_utimens(<br>
>  Â  Â  Â  Â const rtems_filesystem_location_info_t  *pathloc, /* IN */<br>
> -  Â  Â  Â time_t  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â actime,  /* IN */<br>
> -  Â  Â  Â time_t  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â modtime  /* IN */<br>
> +  Â  Â  Â struct timespec  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  times[2] /* IN */<br>
> +<br>
>  )<br>
>  {<br>
>  sattr  arg;<br>
><br>
>  Â  Â  Â  Â /* TODO: add rtems EPOCH - UNIX EPOCH seconds */<br>
> -  Â  Â  Â arg.atime.seconds  = actime;<br>
> -  Â  Â  Â arg.atime.useconds = 0;<br>
> -  Â  Â  Â arg.mtime.seconds  = modtime;<br>
> -  Â  Â  Â arg.mtime.useconds = 0;<br>
> +  Â  Â  Â arg.atime.seconds  = times[0].tv_sec;<br>
> +  Â  Â  Â arg.atime.useconds = times[0].tv_nsec / 1000;<br>
Do we have a macro exposed for this, like in<br>
TOD_NANOSECONDS_PER_MICROSECOND? If not, this is fine I suppose.<br></blockquote><div><br></div><div>This wouldn't be public since it doesn't start with RTEMS_ and I don't</div><div>see any of the TOD_ constants redefined in the RTEMS namespace. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> +  Â  Â  Â arg.mtime.seconds  = times[1].tv_sec;<br>
> +  Â  Â  Â arg.mtime.useconds = times[1].tv_nsec / 1000;<br>
><br>
>  Â  Â  Â  Â return nfs_sattr(pathloc->node_access, &arg, SATTR_ATIME | SATTR_MTIME);<br>
>  }<br>
> @@ -2254,25 +2254,25 @@ sattr  Â arg;<br>
>  }<br>
><br>
>  const struct _rtems_filesystem_operations_table nfs_fs_ops = {<br>
> -  Â  Â  Â .lock_h  Â  Â  Â  Â = nfs_lock,<br>
> -  Â  Â  Â .unlock_h  Â  Â  Â = nfs_unlock,<br>
> -  Â  Â  Â .eval_path_h  Â  = nfs_eval_path,<br>
> -  Â  Â  Â .link_h  Â  Â  Â  Â = nfs_link,<br>
> +  Â  Â  Â .lock_h  Â  Â  Â  Â  Â  = nfs_lock,<br>
> +  Â  Â  Â .unlock_h  Â  Â  Â  Â  = nfs_unlock,<br>
> +  Â  Â  Â .eval_path_h  Â  Â  Â = nfs_eval_path,<br>
> +  Â  Â  Â .link_h  Â  Â  Â  Â  Â  = nfs_link,<br>
>  Â  Â  Â  Â .are_nodes_equal_h = nfs_are_nodes_equal,<br>
> -  Â  Â  Â .mknod_h  Â  Â  Â  = nfs_mknod,<br>
> -  Â  Â  Â .rmnod_h  Â  Â  Â  = nfs_rmnod,<br>
> -  Â  Â  Â .fchmod_h  Â  Â  Â = nfs_fchmod,<br>
> -  Â  Â  Â .chown_h  Â  Â  Â  = nfs_chown,<br>
> -  Â  Â  Â .clonenod_h  Â  Â = nfs_clonenode,<br>
> -  Â  Â  Â .freenod_h  Â  Â  = nfs_freenode,<br>
> -  Â  Â  Â .mount_h  Â  Â  Â  = rtems_filesystem_default_mount,<br>
> -  Â  Â  Â .unmount_h  Â  Â  = rtems_filesystem_default_unmount,<br>
> -  Â  Â  Â .fsunmount_me_h = nfs_fsunmount_me,<br>
> -  Â  Â  Â .utime_h  Â  Â  Â  = nfs_utime,<br>
> -  Â  Â  Â .symlink_h  Â  Â  = nfs_symlink,<br>
> -  Â  Â  Â .readlink_h  Â  Â = nfs_readlink,<br>
> -  Â  Â  Â .rename_h  Â  Â  Â = nfs_rename,<br>
> -  Â  Â  Â .statvfs_h  Â  Â  = rtems_filesystem_default_statvfs<br>
> +  Â  Â  Â .mknod_h  Â  Â  Â  Â  Â = nfs_mknod,<br>
> +  Â  Â  Â .rmnod_h  Â  Â  Â  Â  Â = nfs_rmnod,<br>
> +  Â  Â  Â .fchmod_h  Â  Â  Â  Â  = nfs_fchmod,<br>
> +  Â  Â  Â .chown_h  Â  Â  Â  Â  Â = nfs_chown,<br>
> +  Â  Â  Â .clonenod_h  Â  Â  Â  = nfs_clonenode,<br>
> +  Â  Â  Â .freenod_h  Â  Â  Â  Â = nfs_freenode,<br>
> +  Â  Â  Â .mount_h  Â  Â  Â  Â  Â = rtems_filesystem_default_mount,<br>
> +  Â  Â  Â .unmount_h  Â  Â  Â  Â = rtems_filesystem_default_unmount,<br>
> +  Â  Â  Â .fsunmount_me_h  Â  = nfs_fsunmount_me,<br>
> +  Â  Â  Â .utimens_h  Â  Â  Â  Â = nfs_utimens,<br>
> +  Â  Â  Â .symlink_h  Â  Â  Â  Â = nfs_symlink,<br>
> +  Â  Â  Â .readlink_h  Â  Â  Â  = nfs_readlink,<br>
> +  Â  Â  Â .rename_h  Â  Â  Â  Â  = nfs_rename,<br>
> +  Â  Â  Â .statvfs_h  Â  Â  Â  Â = rtems_filesystem_default_statvfs<br>
Why so many additional whitespace changes?<br>
<br>
>  };<br>
><br>
>  /*****************************************<br>
> --<br>
> 1.8.3.1<br>
><br>
> _______________________________________________<br>
> devel mailing list<br>
> <a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div></div>