Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
021d9f07
Commit
021d9f07
authored
Mar 27, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement NtQueryVolumeInformationFile(FileFsVolumeInformation).
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
19b8aadf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
9 deletions
+34
-9
file.c
dlls/ntdll/file.c
+32
-4
file.c
dlls/ntdll/tests/file.c
+2
-5
No files found.
dlls/ntdll/file.c
View file @
021d9f07
...
...
@@ -3262,7 +3262,6 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, PIO_STATUS_BLOCK io
{
int
fd
,
needs_close
;
struct
stat
st
;
static
int
once
;
io
->
u
.
Status
=
server_get_unix_fd
(
handle
,
0
,
&
fd
,
&
needs_close
,
NULL
,
NULL
);
if
(
io
->
u
.
Status
==
STATUS_BAD_DEVICE_TYPE
)
...
...
@@ -3285,9 +3284,6 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, PIO_STATUS_BLOCK io
switch
(
info_class
)
{
case
FileFsVolumeInformation
:
if
(
!
once
++
)
FIXME
(
"%p: volume info not supported
\n
"
,
handle
);
break
;
case
FileFsLabelInformation
:
FIXME
(
"%p: label info not supported
\n
"
,
handle
);
break
;
...
...
@@ -3448,6 +3444,38 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, PIO_STATUS_BLOCK io
io
->
u
.
Status
=
STATUS_SUCCESS
;
break
;
}
case
FileFsVolumeInformation
:
{
FILE_FS_VOLUME_INFORMATION
*
info
=
buffer
;
struct
mountmgr_unix_drive
*
drive
;
const
WCHAR
*
label
;
if
(
length
<
sizeof
(
FILE_FS_VOLUME_INFORMATION
))
{
io
->
u
.
Status
=
STATUS_INFO_LENGTH_MISMATCH
;
break
;
}
if
(
!
(
drive
=
get_mountmgr_fs_info
(
handle
,
fd
)))
{
ERR_
(
winediag
)(
"Failed to query volume information from mountmgr.
\n
"
);
io
->
u
.
Status
=
STATUS_NOT_IMPLEMENTED
;
break
;
}
label
=
(
WCHAR
*
)((
char
*
)
drive
+
drive
->
label_offset
);
info
->
VolumeCreationTime
.
QuadPart
=
0
;
/* FIXME */
info
->
VolumeSerialNumber
=
drive
->
serial
;
info
->
VolumeLabelLength
=
min
(
wcslen
(
label
)
*
sizeof
(
WCHAR
),
length
-
offsetof
(
FILE_FS_VOLUME_INFORMATION
,
VolumeLabel
)
);
info
->
SupportsObjects
=
(
drive
->
fs_type
==
MOUNTMGR_FS_TYPE_NTFS
);
memcpy
(
info
->
VolumeLabel
,
label
,
info
->
VolumeLabelLength
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
drive
);
io
->
Information
=
offsetof
(
FILE_FS_VOLUME_INFORMATION
,
VolumeLabel
)
+
info
->
VolumeLabelLength
;
io
->
u
.
Status
=
STATUS_SUCCESS
;
break
;
}
case
FileFsControlInformation
:
FIXME
(
"%p: control info not supported
\n
"
,
handle
);
break
;
...
...
dlls/ntdll/tests/file.c
View file @
021d9f07
...
...
@@ -3900,8 +3900,6 @@ static void test_query_volume_information_file(void)
ffvi
=
(
FILE_FS_VOLUME_INFORMATION
*
)
buf
;
todo_wine
{
ok
(
status
==
STATUS_SUCCESS
,
"expected STATUS_SUCCESS, got %d
\n
"
,
status
);
ok
(
U
(
io
).
Status
==
STATUS_SUCCESS
,
"expected STATUS_SUCCESS, got %d
\n
"
,
U
(
io
).
Status
);
...
...
@@ -3909,10 +3907,9 @@ todo_wine
"expected %d, got %lu
\n
"
,
(
FIELD_OFFSET
(
FILE_FS_VOLUME_INFORMATION
,
VolumeLabel
)
+
ffvi
->
VolumeLabelLength
),
io
.
Information
);
ok
(
ffvi
->
VolumeCreationTime
.
QuadPart
!=
0
,
"Missing VolumeCreationTime
\n
"
);
ok
(
ffvi
->
VolumeSerialNumber
!=
0
,
"Missing VolumeSerialNumber
\n
"
);
todo_wine
ok
(
ffvi
->
VolumeCreationTime
.
QuadPart
!=
0
,
"Missing VolumeCreationTime
\n
"
);
todo_wine
ok
(
ffvi
->
VolumeSerialNumber
!=
0
,
"Missing VolumeSerialNumber
\n
"
);
ok
(
ffvi
->
SupportsObjects
==
1
,
"expected 1, got %d
\n
"
,
ffvi
->
SupportsObjects
);
}
ok
(
ffvi
->
VolumeLabelLength
==
lstrlenW
(
ffvi
->
VolumeLabel
)
*
sizeof
(
WCHAR
),
"got %d
\n
"
,
ffvi
->
VolumeLabelLength
);
trace
(
"VolumeSerialNumber: %x VolumeLabelName: %s
\n
"
,
ffvi
->
VolumeSerialNumber
,
wine_dbgstr_w
(
ffvi
->
VolumeLabel
));
...
...
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