Sebastian Lackner : ntdll: Implement FileIdInformation class in NtQueryInformationFile.
Alexandre Julliard
julliard at winehq.org
Thu Feb 16 15:12:29 CST 2017
Module: wine
Branch: master
Commit: 627829daa3d4f06c353a40af38ff3df85ad8f887
URL: http://source.winehq.org/git/wine.git/?a=commit;h=627829daa3d4f06c353a40af38ff3df85ad8f887
Author: Sebastian Lackner <sebastian at fds-team.de>
Date: Thu Feb 16 18:17:51 2017 +0100
ntdll: Implement FileIdInformation class in NtQueryInformationFile.
Based on a patch by Jonathan Doron.
Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/file.c | 12 +++++++++++-
dlls/ntdll/tests/file.c | 2 +-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index f3ff163..fd7f3dd 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -2375,7 +2375,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
0, /* FileRenameInformationBypassAccessCheck */
0, /* FileLinkInformationBypassAccessCheck */
0, /* FileVolumeNameInformation */
- 0, /* FileIdInformation */
+ sizeof(FILE_ID_INFORMATION), /* FileIdInformation */
0, /* FileIdExtdDirectoryInformation */
0, /* FileReplaceCompletionInformation */
0, /* FileHardLinkFullIdInformation */
@@ -2617,6 +2617,16 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
}
}
break;
+ case FileIdInformation:
+ if (fd_get_file_info( fd, &st, &attr ) == -1) io->u.Status = FILE_GetNtStatus();
+ else
+ {
+ FILE_ID_INFORMATION *info = ptr;
+ info->VolumeSerialNumber = 0; /* FIXME */
+ memset( &info->FileId, 0, sizeof(info->FileId) );
+ *(ULONGLONG *)&info->FileId = st.st_ino;
+ }
+ break;
default:
FIXME("Unsupported class (%d)\n", class);
io->u.Status = STATUS_NOT_IMPLEMENTED;
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index e95815c..1a02ce5 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -3277,7 +3277,7 @@ static void test_file_id_information(void)
status = pNtQueryInformationFile( h, &io, &fid, sizeof(fid), FileIdInformation );
if (status == STATUS_NOT_IMPLEMENTED || status == STATUS_INVALID_INFO_CLASS)
{
- skip( "FileIdInformation not supported\n" );
+ win_skip( "FileIdInformation not supported\n" );
CloseHandle( h );
return;
}
More information about the wine-cvs
mailing list