Skip to content

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

Closed
ids1024 wants to merge 1 commit intobytecodealliance:mainfrom
ids1024:ioctl
Closed

Replace Ioctl::OPCODE with an Ioctl::opcode() method#1040
ids1024 wants to merge 1 commit intobytecodealliance:mainfrom
ids1024:ioctl

Conversation

@ids1024
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@sunfishcode
Copy link
Copy Markdown
Member

I apologize for losing track of this, but this change was recently implemented in #1286.

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