Commit Graph

14 Commits

Author SHA1 Message Date
Jeremy Lorelli
d8ba01ec52 cpukit: Raise internal error if we cannot open stdin with fileno 0
If someone manages to open a file before rtems_libio_post_driver is run,
open() may allocate a file number other than 0 for stdin. This leads to
a silent failure of the logic in rtems_libio_post_driver, and confusing
behavior because your BSP behaves as if it doesn't have a console.

Instead of failing silently, raise an internal error if open() succeeds
but gives us an unexpected file number for stdin.
2025-09-20 08:57:16 +10:00
Joel Sherrill
70432fcff2 cpukit/libcsupport/src/[g-r]*: Change license to BSD-2
Updates #3053.
2022-04-01 10:02:30 -05:00
Sebastian Huber
80cf60efec Canonicalize config.h include
Use the following variant which was already used by most source files:

  #ifdef HAVE_CONFIG_H
  #include "config.h"
  #endif
2020-04-16 07:30:00 +02:00
Sebastian Huber
0374ccd8ab libio: Use CONSOLE_DEVICE_NAME 2016-12-23 13:53:55 +01:00
Sebastian Huber
e203b65e51 Add INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILED
Update #2825.
2016-12-12 08:03:30 +01:00
Sebastian Huber
a5ba08eb4f Add INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED
Update #2825.
2016-12-12 08:03:30 +01:00
Sebastian Huber
af8ced5e2d libio: Ensure proper std file descriptors 2016-12-12 08:03:30 +01:00
Sebastian Huber
f64c6b4c49 Use atexit() handler to close std file descriptors 2016-02-03 10:00:57 +01:00
Chris Johns
c49985691f Change all references of rtems.com to rtems.org. 2014-03-21 08:10:47 +11:00
Sebastian Huber
5fa0e5c5ec libcsupport: Rename open_dev_console()
Rename open_dev_console() to rtems_libio_post_driver().  Rename
rtems_libio_supp_helper to rtems_libio_post_driver_helper.
2013-04-26 10:57:08 +02:00
Joel Sherrill
9b4422a251 Remove All CVS Id Strings Possible Using a Script
Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines
  next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
  contain CVS Ids
+ If the processing left a blank line at the top of
  a file, it was removed.
2012-05-11 08:44:13 -05:00
Ralf Corsepius
18daff9b95 Whitespace removal. 2009-11-29 13:35:32 +00:00
Joel Sherrill
eecf752dc3 2009-11-09 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/open_dev_console.c: Use constant numbers to avoid
	overflow when shifting on 16-bit targets.
2009-11-09 15:19:57 +00:00
Joel Sherrill
442e430ddc 2007-06-20 Joel Sherrill <joel.sherrill@OARcorp.com>
* libcsupport/Makefile.am:
	* libcsupport/src/open_dev_console.c: New file.
2007-06-20 22:20:32 +00:00