diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-03-27 11:45:35 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-03-27 11:45:35 +0000 |
| commit | 07fe37b5ee5d5643eca4bc8db13d8bed5399cefa (patch) | |
| tree | 4237bd1ec757a1792543ad498a51d7c2a50e1eb3 /src/ioctl.rs | |
| parent | cde6f0f8628b50008df8cdeb52e80c186f63863a (diff) | |
| parent | 1c721cb20e44fdc7ec294792a9621d54361d344e (diff) | |
Merge pull request #52 from kbleeke/cancel-ioctl
cancel ioctl when future is dropped
Diffstat (limited to 'src/ioctl.rs')
| -rw-r--r-- | src/ioctl.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ioctl.rs b/src/ioctl.rs index 6a7465593..f5ab410db 100644 --- a/src/ioctl.rs +++ b/src/ioctl.rs | |||
| @@ -88,6 +88,10 @@ impl IoctlState { | |||
| 88 | pending | 88 | pending |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | pub fn cancel_ioctl(&self) { | ||
| 92 | self.state.set(IoctlStateInner::Done { resp_len: 0 }); | ||
| 93 | } | ||
| 94 | |||
| 91 | pub async fn do_ioctl(&self, kind: IoctlType, cmd: u32, iface: u32, buf: &mut [u8]) -> usize { | 95 | pub async fn do_ioctl(&self, kind: IoctlType, cmd: u32, iface: u32, buf: &mut [u8]) -> usize { |
| 92 | warn!("doing ioctl"); | 96 | warn!("doing ioctl"); |
| 93 | self.state | 97 | self.state |
