Skip to content

Conversation

philipr-za
Copy link

@philipr-za philipr-za commented Aug 3, 2022

The method used the ioctl return value rather than the reference out argument when constructing the returned bitflags

I noticed the problem when trying to use the read_ring_indicator method in a unix project and I was just getting a result of zero. I tested using the raw ioctl method and realized the return is actually provided by the reference out argument.

The method used the ioctl return value rather than the reference argument when constructing the returned bitflags
@delta1
Copy link

delta1 commented Aug 4, 2022

Nice find, confirmed that arg is used as an out result

https://elixir.bootlin.com/linux/v5.13.18/source/drivers/tty/tty_io.c#L2529

Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thank you for fixing this!

@jessebraham jessebraham merged commit 6542d11 into serialport:main Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants