nix icon indicating copy to clipboard operation
nix copied to clipboard

Use from_bits_retain for all Termios wrapper fields.

Open qwandor opened this issue 1 year ago • 2 comments
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

qwandor avatar Dec 07 '23 14:12 qwandor

Would this PR fix #2071 ?

I think so, can you test it?

qwandor avatar Dec 08 '23 18:12 qwandor

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?

asomers avatar Dec 08 '23 18:12 asomers