From 10f4df519c713d5899ff70b8c50864ba9304bddc Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Fri, 7 Feb 2020 17:07:50 -0800 Subject: [PATCH] dotnet: RejectIrpPriorToTransact0 --- src/dotnet/FileSystemHost.cs | 5 +++++ src/dotnet/Interop.cs | 1 + tst/memfs-dotnet/Program.cs | 1 + 3 files changed, 7 insertions(+) diff --git a/src/dotnet/FileSystemHost.cs b/src/dotnet/FileSystemHost.cs index f517b088..b94ec1cb 100644 --- a/src/dotnet/FileSystemHost.cs +++ b/src/dotnet/FileSystemHost.cs @@ -307,6 +307,11 @@ namespace Fsp get { return 0 != (_VolumeParams.Flags & VolumeParams.WslFeatures); } set { _VolumeParams.Flags |= (value ? VolumeParams.WslFeatures : 0); } } + public Boolean RejectIrpPriorToTransact0 + { + get { return 0 != (_VolumeParams.Flags & VolumeParams.RejectIrpPriorToTransact0); } + set { _VolumeParams.Flags |= (value ? VolumeParams.RejectIrpPriorToTransact0 : 0); } + } /// /// Gets or sets the prefix for a network file system. /// diff --git a/src/dotnet/Interop.cs b/src/dotnet/Interop.cs index a4e92678..6d26aabc 100644 --- a/src/dotnet/Interop.cs +++ b/src/dotnet/Interop.cs @@ -54,6 +54,7 @@ namespace Fsp.Interop internal const UInt32 AllowOpenInKernelMode = 0x01000000; internal const UInt32 CasePreservedExtendedAttributes = 0x02000000; internal const UInt32 WslFeatures = 0x04000000; + internal const UInt32 RejectIrpPriorToTransact0 = 0x10000000; internal const int PrefixSize = 192; internal const int FileSystemNameSize = 16; diff --git a/tst/memfs-dotnet/Program.cs b/tst/memfs-dotnet/Program.cs index 08dd1db0..c6bf0dad 100644 --- a/tst/memfs-dotnet/Program.cs +++ b/tst/memfs-dotnet/Program.cs @@ -285,6 +285,7 @@ namespace memfs Host.PassQueryDirectoryFileName = true; Host.ExtendedAttributes = true; Host.WslFeatures = true; + Host.RejectIrpPriorToTransact0 = true; return STATUS_SUCCESS; }