[PATCH 3/3] sysinit: Do not open console when just referencing reentrancy structure.
Gedare Bloom
gedare at rtems.org
Fri May 28 03:48:51 UTC 2021
Probably.
On Thu, May 27, 2021 at 9:00 PM Joel Sherrill <joel at rtems.org> wrote:
>
> I have already pushed it. Does a ticket need to be manually closed?
>
> On Thu, May 27, 2021, 9:29 PM Gedare Bloom <gedare at rtems.org> wrote:
>>
>> The patch set looks ok, fixing the ticket number on 2/3.
>>
>> On Fri, May 21, 2021 at 3:36 PM Joel Sherrill <joel at rtems.org> wrote:
>> >
>> > This change eliminates a system initialization dependentcy which resulted
>> > in an application without a file system or console referencing errno being
>> > forced to include the code to open(/dev/console), close(), atexit(),
>> > and the unmount infrastructure.
>> >
>> > Closes #4439.
>> > ---
>> > cpukit/include/rtems/confdefs/iodrivers.h | 21 +++++++++++++++++++++
>> > cpukit/libcsupport/src/libio_init.c | 6 ------
>> > 2 files changed, 21 insertions(+), 6 deletions(-)
>> >
>> > diff --git a/cpukit/include/rtems/confdefs/iodrivers.h b/cpukit/include/rtems/confdefs/iodrivers.h
>> > index e12640624d..a7de77a8c3 100644
>> > --- a/cpukit/include/rtems/confdefs/iodrivers.h
>> > +++ b/cpukit/include/rtems/confdefs/iodrivers.h
>> > @@ -189,6 +189,27 @@ RTEMS_SYSINIT_ITEM(
>> > || CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER
>> > || CONFIGURE_MAXIMUM_DRIVERS */
>> >
>> > +
>> > +/*
>> > + * If any flavor of console driver is configured, then configure the post
>> > + * driver hook which opens /dev/console as stdin, stdout, and stderr.
>> > + *
>> > + * NOTE: This also results in an atexit() handler being registered to close
>> > + * /dev/console.
>> > + */
>> > +#if defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) || \
>> > + defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER) || \
>> > + defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER)
>> > +
>> > + #include <rtems/libio.h>
>> > +
>> > + RTEMS_SYSINIT_ITEM(
>> > + rtems_libio_post_driver,
>> > + RTEMS_SYSINIT_STD_FILE_DESCRIPTORS,
>> > + RTEMS_SYSINIT_ORDER_MIDDLE
>> > + );
>> > +#endif
>> > +
>> > #endif /* CONFIGURE_INIT */
>> >
>> > #endif /* _RTEMS_CONFDEFS_IODRIVERS_H */
>> > diff --git a/cpukit/libcsupport/src/libio_init.c b/cpukit/libcsupport/src/libio_init.c
>> > index d5814ca5a2..2bfc7664d7 100644
>> > --- a/cpukit/libcsupport/src/libio_init.c
>> > +++ b/cpukit/libcsupport/src/libio_init.c
>> > @@ -65,9 +65,3 @@ RTEMS_SYSINIT_ITEM(
>> > RTEMS_SYSINIT_LIBIO,
>> > RTEMS_SYSINIT_ORDER_MIDDLE
>> > );
>> > -
>> > -RTEMS_SYSINIT_ITEM(
>> > - rtems_libio_post_driver,
>> > - RTEMS_SYSINIT_STD_FILE_DESCRIPTORS,
>> > - RTEMS_SYSINIT_ORDER_MIDDLE
>> > -);
>> > --
>> > 2.24.4
>> >
>> > _______________________________________________
>> > devel mailing list
>> > devel at rtems.org
>> > http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list