From b06ce0514ea5467cf3ac72ad85e4d1845c51fbad Mon Sep 17 00:00:00 2001 From: Thomas Gibson-Robinson Date: Fri, 22 Aug 2025 12:44:05 +0000 Subject: [PATCH] windows: add FILE_ZERO_DATA_INFORMATION This is needed for invoking windows.DeviceIoControl with windows.FSCTL_SET_ZERO_DATA. Change-Id: I20f93a40a86b92e6bdeeec096ffc0245e8184672 GitHub-Last-Rev: 01d299ab84cb90049cc62b4f1f63f6b1b25f046c GitHub-Pull-Request: golang/sys#261 Reviewed-on: https://go-review.googlesource.com/c/sys/+/698436 Auto-Submit: Michael Pratt Reviewed-by: Quim Muntal LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Pratt Reviewed-by: Cherry Mui --- windows/types_windows.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/windows/types_windows.go b/windows/types_windows.go index 958bcf47..993a2297 100644 --- a/windows/types_windows.go +++ b/windows/types_windows.go @@ -1976,6 +1976,12 @@ const ( SYMBOLIC_LINK_FLAG_DIRECTORY = 0x1 ) +// FILE_ZERO_DATA_INFORMATION from winioctl.h +type FileZeroDataInformation struct { + FileOffset int64 + BeyondFinalZero int64 +} + const ( ComputerNameNetBIOS = 0 ComputerNameDnsHostname = 1