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
x/sys/unix: add IoctlSetIntPtr #46060
Comments
IoctlSetModifiablePointerInt
that reflects changes in the ioctl value
Change https://golang.org/cl/318210 mentions this issue: |
Following the discussing in #46058, I further investigated: ioctl calls of the Previously I've been using https://github.com/vtolstov/go-ioctl which allows manual specification of |
IoctlSetModifiablePointerInt
that reflects changes in the ioctl valueIoctlSetModifiablePointerInt
that reflects changes in the ioctl value
IoctlSetModifiablePointerInt
that reflects changes in the ioctl valueIoctlSetModifiablePointerInt
that reflects changes in the ioctl value
IoctlSetModifiablePointerInt
that reflects changes in the ioctl valueIoctlSetModifiablePointerInt
that reflects changes in the ioctl value
We use "BytePtr" elsewhere, so we could call this |
IoctlSetModifiablePointerInt
that reflects changes in the ioctl valueIoctlSetIntPtr
This proposal has been added to the active column of the proposals project |
IoctlSetIntPtr
Updated CL to reflect this. (https://golang.org/cl/318210) |
Based on the discussion above, this proposal seems like a likely accept. |
No change in consensus, so accepted. |
Implemented in CL 318210 |
#45585 mentions the importance of differentiating between (u)int(32|64). On a 64 bit system ints in the kernel are usually 32 bits, so this function may be flaky since Go's ints may be 64 bits. Perhaps what is required is Putting the CL as WIP now. Thoughts? |
What did you expect to see?
Original discussion: #46058
Some ioctl calls, such as https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html#setting-and-getting-the-timeout, modify the value in the ioctl call after the value is passed into the operation. Such ioctl calls are of the IOWR (IO write read) variant, as opposed to the IOR and IOW variants.
IoctlSetPointerInt
is not able to return the modified value.Proposed fix:
The text was updated successfully, but these errors were encountered: