rtems-kernel-init.c tries to re-make existing "/etc"

Joel Sherrill joel at rtems.org
Thu Apr 18 14:55:44 UTC 2024


On Thu, Apr 18, 2024 at 9:50 AM Peter Dufault <dufault at hda.com> wrote:

>
>
> > On Apr 18, 2024, at 10:34 AM, Kinsey Moore <kinsey.moore at oarcorp.com>
> wrote:
> >
> > A patch for EEXIST here should be fine. It would be nice if the caller
> were more resilient.
> >
>
> I also changed "default-network-init.h" to assert rtems_bsd_initialize()
> worked.
>
>   sc = rtems_bsd_initialize();
>   assert(sc == RTEMS_SUCCESSFUL);
>
> At least you get a panic message.  I'll submit a patch.
>

Why does /etc already exist? Is it really an error if it already exists?

If the startup code untar'ed some initial file system contents before
calling this, then /etc would almost certainly exist.

Unless I am missing something EEXIST should be acceptable. Other errors are
most likely really fatal.

https://pubs.opengroup.org/onlinepubs/9699919799/functions/mkdir.html

--joel

>
> Peter
> -----------------
> Peter Dufault
> HD Associates, Inc.      Software and System Engineering
>
>
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20240418/0e2c8107/attachment-0001.htm>


More information about the devel mailing list