-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Open
Labels
ProposalProposal-Acceptedcompiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
Description
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:
// IoctlSetModifiablePointerInt performs an ioctl operation which sets a
// pointer to an integer value on fd, using the specified request number.
//
// Use this if the ioctl operation may modify the value.
func IoctlSetModifiablePointerInt(fd int, req uint, value *int) error {
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
}
Metadata
Metadata
Assignees
Labels
ProposalProposal-Acceptedcompiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Type
Projects
Status
Triage Backlog
Status
Accepted