<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Reply is below.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b>From:</b> Joel Sherrill <joel@rtems.org>
<br>
<b>Sent:</b> Friday, May 21, 2021 9:44 AM<br>
<b>To:</b> Gedare Bloom <gedare@rtems.org><br>
<b>Cc:</b> Ryan Long <ryan.long@oarcorp.com>; vijay@rtems.rog; rtems-devel@rtems.org <devel@rtems.org><br>
<b>Subject:</b> Re: [PATCH v2] legacy nfs.c: Change filesystem utime_h handler to utimens_h<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in">As a warning, this and the corresponding libbsd patch are queued <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">behind an RSB patch to get UTIME_NOW and UTIME_OMIT in<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">newlib. That patch was merged into newlib. Then the RTEMS <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">*utime* patch set and these two will go in at the same time. Otherwise,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">there will be breakage.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in">On Fri, May 21, 2021 at 9:26 AM Gedare Bloom <<a href="mailto:gedare@rtems.org">gedare@rtems.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal" style="margin-left:.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.<o:p></o:p></p>
</blockquote>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">This wouldn't be public since it doesn't start with RTEMS_ and I don't<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">see any of the TOD_ constants redefined in the RTEMS namespace. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal" style="margin-left:.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?<o:p></o:p></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.<o:p></o:p></i></b></p>
<p class="MsoNormal" style="margin-left:.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><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</body>
</html>