Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Ioctl::OPCODE with an Ioctl::opcode() method #1040

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ids1024
Copy link
Contributor

@ids1024 ids1024 commented Mar 28, 2024

This is a breaking API change.

This is needed for something like SPI_IOC_MESSAGE(N), which takes an array of N spi_ioc_transfer structs. Which nix this ioctl would use ioctl_write_buf!. I'm not sure what other ioctls use this.

It probably should also have a helper type implementing Ioctl for this use case. Though it would help to know that it works for more than one ioctl...

This is a breaking API change.

This is needed for something like `SPI_IOC_MESSAGE(N)`, which takes an
array of `N` `spi_ioc_transfer` structs. Which nix this ioctl would use
`ioctl_write_buf!`. I'm not sure what other ioctls use this.

It probably should also have a helper type implementing `Ioctl` for this
use case. Though it would help to know that it works for more than one
ioctl...
@sunfishcode sunfishcode added the semver bump Issues that will require a semver-incompatible fix label Apr 15, 2024
@sunfishcode
Copy link
Member

This change looks reasonable to me. That said, I don't currently have a schedule for when the next semver break will happen.

@ids1024
Copy link
Contributor Author

ids1024 commented Apr 15, 2024

Right. It's not urgent, but seems good to make sure some change like this gets in whenever there is another API break.

I think with this, all ioctls should be possible to support. Though it's hard to be sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver bump Issues that will require a semver-incompatible fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants