Stuff next three nibbles of tv_sec into top of tv_nsec to fix y2038 #38
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.
The domain of the usec field is [0, 999999] which is [0, 0x000F423F], which leaves us the top three nibbles.
Thus, change the header format from
to
this is fully-equivalent until y2038, and introduces a small-but-constant "error" to parsers that don't understand this in files recorded after y2038.
I provide samples of files recorded in 2050, 2100, 2150:
2050.ttyrec.gz
2100.ttyrec.gz
2150.ttyrec.gz
Closes #37
Closes: Debian#1094187