authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2025-12-14 18:44:26-05:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2025-12-14 18:45:07-05:00
logc8cdb94333406086d8db79b1d537a4f1529123e7
tree12b4a46a61839316d7d724a6db739b839ad3300a
parentbf53a2de51858e034435b83c47ce0174b14b1e1f

windows: fix `DeviceIoControl` dispatch


1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/os/windows.zig+2-2
...@@ -2609,7 +2609,7 @@ pub fn DeviceIoControl(...@@ -2609,7 +2609,7 @@ pub fn DeviceIoControl(
2609) DeviceIoControlError!void {2609) DeviceIoControlError!void {
2610 var io_status_block: IO_STATUS_BLOCK = undefined;2610 var io_status_block: IO_STATUS_BLOCK = undefined;
2611 const rc = switch (io_control_code.DeviceType) {2611 const rc = switch (io_control_code.DeviceType) {
2612 .FILE_SYSTEM, .NAMED_PIPE => ntdll.NtFsControlFile(2612 else => ntdll.NtDeviceIoControlFile(
2613 device,2613 device,
2614 opts.event,2614 opts.event,
2615 opts.apc_routine,2615 opts.apc_routine,
...@@ -2621,7 +2621,7 @@ pub fn DeviceIoControl(...@@ -2621,7 +2621,7 @@ pub fn DeviceIoControl(
2621 if (opts.out.len > 0) opts.out.ptr else null,2621 if (opts.out.len > 0) opts.out.ptr else null,
2622 @intCast(opts.out.len),2622 @intCast(opts.out.len),
2623 ),2623 ),
2624 else => ntdll.NtDeviceIoControlFile(2624 .FILE_SYSTEM => ntdll.NtFsControlFile(
2625 device,2625 device,
2626 opts.event,2626 opts.event,
2627 opts.apc_routine,2627 opts.apc_routine,