[PATCH] fsnofs01/init.c: Check for ENOENT from utime().

Joel Sherrill joel at rtems.org
Wed Jun 9 15:34:50 UTC 2021


On Wed, Jun 9, 2021 at 12:43 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> On 08/06/2021 20:16, Joel Sherrill wrote:
> > The addition of the entire*utime*() family of functions resulted
> > in this call returning ENOENT not ENXIO. This is better aligned
> > with the POSIX definition of the methods.
>
> Does this utime(path, NULL) call essentially fail because the fstat_h
> handler returns an error? Does this mean that the utimes_h handler is
> unreachable for the null node (null_op_utimens)?
>

Yes. That looks to be the case. All of the *utime* methods are related.
utime() and utimes() are wrappers and the two underlying POSIX methods
do a permissions check which has stat. If you always get an error from
stat_h,
then you won't try the utimens_h handler.

I also noticed a couple of the files included <sys/stat.h> but didn't need
it.
I'll delete that also.

--joel

>
> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber at embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax:   +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210609/39e3daa3/attachment.html>


More information about the devel mailing list