> 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 
> 
> Peter
> -----------------
> Peter Dufault
> HD Associates, Inc.      Software and System Engineering
> 

Oh, and maybe you misunderstood: The "assert()" is in *addition* to allowing 
EEXIST for the "mkdir()" call.  It avoids a weird crash in case 
"rtems_bsd_initialize()" fails for some other reason.

Peter
-----------------
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