tst: passthrough: testing

This commit is contained in:
Bill Zissimopoulos 2017-01-23 14:33:07 -08:00
parent 5475c414b3
commit ebad86387c
2 changed files with 38 additions and 30 deletions

View File

@ -91,6 +91,9 @@ static NTSTATUS WinFspLoad(VOID)
LONG Result;
HMODULE Module;
Module = LoadLibraryW(L"" FSP_DLLNAME);
if (0 == Module)
{
Size = sizeof PathBuf;
Result = RegGetValueW(
HKEY_LOCAL_MACHINE, L"Software\\WinFsp", L"InstallDir",
@ -107,6 +110,7 @@ static NTSTATUS WinFspLoad(VOID)
Result = __HrLoadAllImportsForDll(FSP_DLLNAME);
if (0 > Result)
return STATUS_DELAY_LOAD_FAILED;
}
return STATUS_SUCCESS;
@ -1102,7 +1106,7 @@ static NTSTATUS Overwrite(FSP_FILE_SYSTEM *FileSystem,
if (ReplaceFileAttributes)
{
if (0 == FileAttributes)
FileAttributes = FILE_ATTRIBUTES_NORMAL;
FileAttributes = FILE_ATTRIBUTE_NORMAL;
BasicInfo.FileAttributes = FileAttributes; // <1>
if (!SetFileInformationByHandle(Handle,

View File

@ -255,7 +255,7 @@ static NTSTATUS Overwrite(FSP_FILE_SYSTEM *FileSystem,
if (ReplaceFileAttributes)
{
if (0 == FileAttributes)
FileAttributes = FILE_ATTRIBUTES_NORMAL;
FileAttributes = FILE_ATTRIBUTE_NORMAL;
BasicInfo.FileAttributes = FileAttributes;
if (!SetFileInformationByHandle(Handle,
@ -907,6 +907,9 @@ static NTSTATUS WinFspLoad(VOID)
LONG Result;
HMODULE Module;
Module = LoadLibraryW(L"" FSP_DLLNAME);
if (0 == Module)
{
Size = sizeof PathBuf;
Result = RegGetValueW(
HKEY_LOCAL_MACHINE, L"Software\\WinFsp", L"InstallDir",
@ -923,6 +926,7 @@ static NTSTATUS WinFspLoad(VOID)
Result = __HrLoadAllImportsForDll(FSP_DLLNAME);
if (0 > Result)
return STATUS_DELAY_LOAD_FAILED;
}
return STATUS_SUCCESS;