> On Apr 18, 2024, at 10:55 AM, Joel Sherrill <j...@rtems.org> wrote:
> 
> 
> 
> On Thu, Apr 18, 2024 at 9:50 AM Peter Dufault <dufa...@hda.com> wrote:
> 
> 
> > On Apr 18, 2024, at 10:34 AM, Kinsey Moore <kinsey.mo...@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 
> 

The function "_libcsupport_pwdgrp_init()" over in RTEMS also creates "/etc" 
through a "pthread_once()".  A call to "getpwnam()", "getpwuid()", "getgrnam()" 
and family will create it.  Apparently that is called first.

Peter Dufault
HD Associates, Inc.      Software and System Engineering



_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to