Commit 627829da authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

ntdll: Implement FileIdInformation class in NtQueryInformationFile.

Based on a patch by Jonathan Doron. Signed-off-by: 's avatarSebastian Lackner <sebastian@fds-team.de> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 8b3d43ac
...@@ -2375,7 +2375,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io, ...@@ -2375,7 +2375,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
0, /* FileRenameInformationBypassAccessCheck */ 0, /* FileRenameInformationBypassAccessCheck */
0, /* FileLinkInformationBypassAccessCheck */ 0, /* FileLinkInformationBypassAccessCheck */
0, /* FileVolumeNameInformation */ 0, /* FileVolumeNameInformation */
0, /* FileIdInformation */ sizeof(FILE_ID_INFORMATION), /* FileIdInformation */
0, /* FileIdExtdDirectoryInformation */ 0, /* FileIdExtdDirectoryInformation */
0, /* FileReplaceCompletionInformation */ 0, /* FileReplaceCompletionInformation */
0, /* FileHardLinkFullIdInformation */ 0, /* FileHardLinkFullIdInformation */
...@@ -2617,6 +2617,16 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io, ...@@ -2617,6 +2617,16 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
} }
} }
break; 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: default:
FIXME("Unsupported class (%d)\n", class); FIXME("Unsupported class (%d)\n", class);
io->u.Status = STATUS_NOT_IMPLEMENTED; io->u.Status = STATUS_NOT_IMPLEMENTED;
......
...@@ -3277,7 +3277,7 @@ static void test_file_id_information(void) ...@@ -3277,7 +3277,7 @@ static void test_file_id_information(void)
status = pNtQueryInformationFile( h, &io, &fid, sizeof(fid), FileIdInformation ); status = pNtQueryInformationFile( h, &io, &fid, sizeof(fid), FileIdInformation );
if (status == STATUS_NOT_IMPLEMENTED || status == STATUS_INVALID_INFO_CLASS) if (status == STATUS_NOT_IMPLEMENTED || status == STATUS_INVALID_INFO_CLASS)
{ {
skip( "FileIdInformation not supported\n" ); win_skip( "FileIdInformation not supported\n" );
CloseHandle( h ); CloseHandle( h );
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment