summaryrefslogtreecommitdiff
path: root/vendor/github.com/Microsoft/hcsshim/internal/winapi/filesystem.go
diff options
context:
space:
mode:
authordependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>2020-12-23 09:17:35 +0000
committerDaniel J Walsh <dwalsh@redhat.com>2020-12-23 04:29:57 -0500
commit057faea5c185d24cda40d310b0a80763ee46f4cc (patch)
tree148844953c6a27c11313175c7c9cd6625152a371 /vendor/github.com/Microsoft/hcsshim/internal/winapi/filesystem.go
parent07663f74c48d11732a3330248f837d5abf86fe9c (diff)
downloadpodman-057faea5c185d24cda40d310b0a80763ee46f4cc.tar.gz
podman-057faea5c185d24cda40d310b0a80763ee46f4cc.tar.bz2
podman-057faea5c185d24cda40d310b0a80763ee46f4cc.zip
Bump github.com/containers/storage from 1.24.3 to 1.24.4
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.24.3 to 1.24.4. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/compare/v1.24.3...v1.24.4) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/Microsoft/hcsshim/internal/winapi/filesystem.go')
-rw-r--r--vendor/github.com/Microsoft/hcsshim/internal/winapi/filesystem.go110
1 files changed, 110 insertions, 0 deletions
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/winapi/filesystem.go b/vendor/github.com/Microsoft/hcsshim/internal/winapi/filesystem.go
new file mode 100644
index 000000000..490576b94
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/winapi/filesystem.go
@@ -0,0 +1,110 @@
+package winapi
+
+//sys NtCreateFile(handle *uintptr, accessMask uint32, oa *ObjectAttributes, iosb *IOStatusBlock, allocationSize *uint64, fileAttributes uint32, shareAccess uint32, createDisposition uint32, createOptions uint32, eaBuffer *byte, eaLength uint32) (status uint32) = ntdll.NtCreateFile
+//sys NtSetInformationFile(handle uintptr, iosb *IOStatusBlock, information uintptr, length uint32, class uint32) (status uint32) = ntdll.NtSetInformationFile
+
+//sys NtOpenDirectoryObject(handle *uintptr, accessMask uint32, oa *ObjectAttributes) (status uint32) = ntdll.NtOpenDirectoryObject
+//sys NtQueryDirectoryObject(handle uintptr, buffer *byte, length uint32, singleEntry bool, restartScan bool, context *uint32, returnLength *uint32)(status uint32) = ntdll.NtQueryDirectoryObject
+
+const (
+ FileLinkInformationClass = 11
+ FileDispositionInformationExClass = 64
+
+ FILE_READ_ATTRIBUTES = 0x0080
+ FILE_WRITE_ATTRIBUTES = 0x0100
+ DELETE = 0x10000
+
+ FILE_OPEN = 1
+ FILE_CREATE = 2
+
+ FILE_LIST_DIRECTORY = 0x00000001
+ FILE_DIRECTORY_FILE = 0x00000001
+ FILE_SYNCHRONOUS_IO_NONALERT = 0x00000020
+ FILE_OPEN_FOR_BACKUP_INTENT = 0x00004000
+ FILE_OPEN_REPARSE_POINT = 0x00200000
+
+ FILE_DISPOSITION_DELETE = 0x00000001
+
+ OBJ_DONT_REPARSE = 0x1000
+
+ STATUS_MORE_ENTRIES = 0x105
+ STATUS_NO_MORE_ENTRIES = 0x8000001a
+)
+
+// Select entries from FILE_INFO_BY_HANDLE_CLASS.
+//
+// C declaration:
+// typedef enum _FILE_INFO_BY_HANDLE_CLASS {
+// FileBasicInfo,
+// FileStandardInfo,
+// FileNameInfo,
+// FileRenameInfo,
+// FileDispositionInfo,
+// FileAllocationInfo,
+// FileEndOfFileInfo,
+// FileStreamInfo,
+// FileCompressionInfo,
+// FileAttributeTagInfo,
+// FileIdBothDirectoryInfo,
+// FileIdBothDirectoryRestartInfo,
+// FileIoPriorityHintInfo,
+// FileRemoteProtocolInfo,
+// FileFullDirectoryInfo,
+// FileFullDirectoryRestartInfo,
+// FileStorageInfo,
+// FileAlignmentInfo,
+// FileIdInfo,
+// FileIdExtdDirectoryInfo,
+// FileIdExtdDirectoryRestartInfo,
+// FileDispositionInfoEx,
+// FileRenameInfoEx,
+// FileCaseSensitiveInfo,
+// FileNormalizedNameInfo,
+// MaximumFileInfoByHandleClass
+// } FILE_INFO_BY_HANDLE_CLASS, *PFILE_INFO_BY_HANDLE_CLASS;
+//
+// Documentation: https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ne-minwinbase-file_info_by_handle_class
+const (
+ FileIdInfo = 18
+)
+
+type FileDispositionInformationEx struct {
+ Flags uintptr
+}
+
+type IOStatusBlock struct {
+ Status, Information uintptr
+}
+
+type ObjectAttributes struct {
+ Length uintptr
+ RootDirectory uintptr
+ ObjectName uintptr
+ Attributes uintptr
+ SecurityDescriptor uintptr
+ SecurityQoS uintptr
+}
+
+type ObjectDirectoryInformation struct {
+ Name UnicodeString
+ TypeName UnicodeString
+}
+
+type FileLinkInformation struct {
+ ReplaceIfExists bool
+ RootDirectory uintptr
+ FileNameLength uint32
+ FileName [1]uint16
+}
+
+// C declaration:
+// typedef struct _FILE_ID_INFO {
+// ULONGLONG VolumeSerialNumber;
+// FILE_ID_128 FileId;
+// } FILE_ID_INFO, *PFILE_ID_INFO;
+//
+// Documentation: https://docs.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-file_id_info
+type FILE_ID_INFO struct {
+ VolumeSerialNumber uint64
+ FileID [16]byte
+}