nix
nix copied to clipboard
Use from_bits_retain for all Termios wrapper fields.
trafficstars
What does this PR do
In case there are any unrecognised bits, they should be kept when setting fields of the underlying libc termios struct in get_libc_termios, rather than being dropped. This ensures that termios can be roundtripped even with unrecognised bits set.
(I came across this issue on Android in part of the NFC stack, but it should also fix #2071.)
Checklist:
- [x] I have read
CONTRIBUTING.md - [x] I have written necessary tests and rustdoc comments
- [x] A change log has been added if this PR modifies nix's API
Would this PR fix #2071 ?
I think so, can you test it?
Would this PR fix #2071 ?
I think so, can you test it?
No, I can't. I don't have an Illumos system. Maybe @nospam3089 can test it?