Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
152580ce
Commit
152580ce
authored
Feb 20, 2024
by
Jinoh Kang
Committed by
Alexandre Julliard
Feb 19, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement NtQueryInformationFile FileStatInformation.
parent
f5e7abb4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
file.c
dlls/ntdll/tests/file.c
+1
-1
file.c
dlls/ntdll/unix/file.c
+29
-1
No files found.
dlls/ntdll/tests/file.c
View file @
152580ce
...
...
@@ -4372,7 +4372,7 @@ static void test_file_stat_information(void)
status
=
pNtQueryInformationFile
(
h
,
&
io
,
&
fsd
,
sizeof
(
fsd
),
FileStatInformation
);
if
(
status
==
STATUS_NOT_IMPLEMENTED
||
status
==
STATUS_INVALID_INFO_CLASS
)
{
skip
(
"FileStatInformation not supported
\n
"
);
win_
skip
(
"FileStatInformation not supported
\n
"
);
CloseHandle
(
h
);
return
;
}
...
...
dlls/ntdll/unix/file.c
View file @
152580ce
...
...
@@ -4334,7 +4334,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
0
,
/* FileRenameInformationEx */
0
,
/* FileRenameInformationExBypassAccessCheck */
0
,
/* FileDesiredStorageClassInformation */
0
,
/* FileStatInformation */
sizeof
(
FILE_STAT_INFORMATION
),
/* FileStatInformation */
0
,
/* FileMemoryPartitionInformation */
0
,
/* FileStatLxInformation */
0
,
/* FileCaseSensitiveInformation */
...
...
@@ -4549,6 +4549,34 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
info
->
ReparseTag
=
IO_REPARSE_TAG_MOUNT_POINT
;
}
break
;
case
FileStatInformation
:
if
(
fd_get_file_info
(
fd
,
options
,
&
st
,
&
attr
)
==
-
1
)
status
=
errno_to_status
(
errno
);
else
if
(
!
S_ISREG
(
st
.
st_mode
)
&&
!
S_ISDIR
(
st
.
st_mode
))
status
=
STATUS_INVALID_INFO_CLASS
;
else
{
FILE_STAT_INFORMATION
*
info
=
ptr
;
FILE_BASIC_INFORMATION
basic
;
FILE_STANDARD_INFORMATION
std
;
fill_file_info
(
&
st
,
attr
,
&
basic
,
FileBasicInformation
);
fill_file_info
(
&
st
,
attr
,
&
std
,
FileStandardInformation
);
info
->
FileId
.
QuadPart
=
st
.
st_ino
;
info
->
CreationTime
=
basic
.
CreationTime
;
info
->
LastAccessTime
=
basic
.
LastAccessTime
;
info
->
LastWriteTime
=
basic
.
LastWriteTime
;
info
->
ChangeTime
=
basic
.
ChangeTime
;
info
->
AllocationSize
=
std
.
AllocationSize
;
info
->
EndOfFile
=
std
.
EndOfFile
;
info
->
FileAttributes
=
attr
;
info
->
ReparseTag
=
0
;
/* FIXME */
if
((
options
&
FILE_OPEN_REPARSE_POINT
)
&&
fd_is_mount_point
(
fd
,
&
st
))
info
->
ReparseTag
=
IO_REPARSE_TAG_MOUNT_POINT
;
info
->
NumberOfLinks
=
std
.
NumberOfLinks
;
info
->
EffectiveAccess
=
FILE_ALL_ACCESS
;
/* FIXME */
}
break
;
default:
FIXME
(
"Unsupported class (%d)
\n
"
,
class
);
status
=
STATUS_NOT_IMPLEMENTED
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment