Jeremy Lorelli created a merge request: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/541

Project:Branches: jjl77/rtems:pr-fix-mvme3100 to rtems/rtos/rtems:main
Author:   Jeremy Lorelli




## Summary

The ds1375 driver was using the /dev/ interface for i2c. Since drivers get 
initialized so early, it was actually opening a file in /dev/ before 
stdin/stdout/stderr had been opened. 

By the time `rtems_libio_post_driver` is run to open stdin/stdout/stderr, file 
no. 0 has been allocated to the ds1375 driver. The logic in 
`rtems_libio_post_driver` also assumes that `open(/dev/console) != 
STDIN_FILENO` just means that the BSP has been configured without a console 
driver. This results in the BSP behaving as if it has been configured without a 
console driver (all standard streams are closed).

This MR contains the following changes:
* Refactor ds1375 driver to use i2c-rtc driver instead.
* Check if open(/dev/console) actually fails or if it gives us an unexpected 
file number. If it gives us an unexpected file number, raise an internal error.

<!-- Default settings, if it is a dropdown it will set after submission -->

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/541
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to