<div dir="ltr">The RSB has been updated to include the newlib patch for a week now. I plan to push the utimens patches to rtems, libbsd, and legacy by the end of today. <div><br></div><div>I've held off a bit since this required a newlib/tool bump. I think there has been plenty of notice now.<br><div><br></div><div>--joel</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 28, 2021 at 9:14 AM Ryan Long <<a href="mailto:ryan.long@oarcorp.com">ryan.long@oarcorp.com</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">





<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="gmail-m_-2907411772181462583WordSection1">
<p class="MsoNormal">Reply is below.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in">
<p class="MsoNormal" style="margin-left:0.5in"><b>From:</b> Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>>
<br>
<b>Sent:</b> Friday, May 21, 2021 9:44 AM<br>
<b>To:</b> Gedare Bloom <<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>><br>
<b>Cc:</b> Ryan Long <<a href="mailto:ryan.long@oarcorp.com" target="_blank">ryan.long@oarcorp.com</a>>; vijay@rtems.rog; <a href="mailto:rtems-devel@rtems.org" target="_blank">rtems-devel@rtems.org</a> <<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a>><br>
<b>Subject:</b> Re: [PATCH v2] legacy nfs.c: Change filesystem utime_h handler to utimens_h<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:0.5in">As a warning, this and the corresponding libbsd patch are queued <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:0.5in">behind an RSB patch to get UTIME_NOW and UTIME_OMIT in<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:0.5in">newlib. That patch was merged into newlib. Then the RTEMS <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:0.5in">*utime* patch set and these two will go in at the same time. Otherwise,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:0.5in">there will be breakage.<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:0.5in">On Fri, May 21, 2021 at 9:26 AM Gedare Bloom <<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal" style="margin-left:0.5in">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.<u></u><u></u></p>
</blockquote>
<div>
<p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:0.5in">This wouldn't be public since it doesn't start with RTEMS_ and I don't<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:0.5in">see any of the TOD_ constants redefined in the RTEMS namespace. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:0.5in"> <u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal" style="margin-left:0.5in"><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?<u></u><u></u></p>
<p class="MsoNormal"><b><i>[Ryan Long] When I changed utime_h to utimens_h, it got everything out of alignment, so I moved everything over.<u></u><u></u></i></b></p>
<p class="MsoNormal" style="margin-left:0.5in"><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" 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" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><u></u><u></u></p>
</blockquote>
</div>
</div>
</div>
</div>

</blockquote></div>