diff options
| author | Fuwn <[email protected]> | 2022-01-03 13:11:07 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-01-03 13:11:07 -0800 |
| commit | f94a885f94819c12a2ac0a1696082e481c65461f (patch) | |
| tree | 0896861aa1bb22945f8402e846ffefbf6a0f87c5 /crates/windows-kernel-rs/src/device.rs | |
| parent | fix(windows-kernel-rs): mark unsafe functions (diff) | |
| download | driver-f94a885f94819c12a2ac0a1696082e481c65461f.tar.xz driver-f94a885f94819c12a2ac0a1696082e481c65461f.zip | |
fix(windows-kernel-rs): mark unsafe functions
Diffstat (limited to 'crates/windows-kernel-rs/src/device.rs')
| -rw-r--r-- | crates/windows-kernel-rs/src/device.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/windows-kernel-rs/src/device.rs b/crates/windows-kernel-rs/src/device.rs index 4dabfba..6bebc36 100644 --- a/crates/windows-kernel-rs/src/device.rs +++ b/crates/windows-kernel-rs/src/device.rs @@ -434,7 +434,9 @@ pub struct DeviceExtension { pub(crate) device_type: DeviceType, } -pub extern "C" fn dispatch_device(device: *mut DEVICE_OBJECT, irp: *mut IRP) -> NTSTATUS { +/// # Safety +/// `unsafe` +pub unsafe extern "C" fn dispatch_device(device: *mut DEVICE_OBJECT, irp: *mut IRP) -> NTSTATUS { let stack_location = unsafe { &*IoGetCurrentIrpStackLocation(irp) }; let device = unsafe { Device::from_raw(device) }; let vtable = device.vtable(); |