Repository navigation
Support diagnostic text reads from the RTC device - #2
Merged
Merged
Conversation
JohnAmadis
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cat /dev/rtcpreviously failed because the driver rejected read operations. Return a 20-byte diagnostic line,YYYY-MM-DDTHH:MM:SS\n, followed by EOF. The line carries the device's civil time without assuming a timezone.Capture time on the first nonempty read per open handle. Partial reads and seeks reuse the same snapshot, so a changing calendar cannot splice two timestamps together; reopen for fresh time. Unset clocks return ENODATA without caching the failure. Validate handle, read permissions, buffer and offset; setting time continues through the standard ioctl interface.
Validation: native ctest 3/3 with 14/14 driver steps, STM32F4/F7 builds, and STM32F746G-DISCO RTC 12/12 through VFS, dmdrvi 6/6, RNG 6/6. Actual cat output checked before and after restoring PC time. Snapshot/partial-read/EOF/buffer-guard/error cases are covered; console evidence and package hashes are in docs/testing.md.
This is a separate change based on main after the merge of #1.