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
d53a55ea
Commit
d53a55ea
authored
Mar 25, 2013
by
André Hentschel
Committed by
Alexandre Julliard
Mar 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Improve stub for FileFsAttributeInformation in NtQueryVolumeInformationFile.
parent
7b9fc3bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
1 deletion
+65
-1
file.c
dlls/ntdll/file.c
+18
-1
file.c
dlls/ntdll/tests/file.c
+47
-0
No files found.
dlls/ntdll/file.c
View file @
d53a55ea
...
@@ -92,6 +92,7 @@ mode_t FILE_umask = 0;
...
@@ -92,6 +92,7 @@ mode_t FILE_umask = 0;
#define SECSPERDAY 86400
#define SECSPERDAY 86400
#define SECS_1601_TO_1970 ((369 * 365 + 89) * (ULONGLONG)SECSPERDAY)
#define SECS_1601_TO_1970 ((369 * 365 + 89) * (ULONGLONG)SECSPERDAY)
static
const
WCHAR
ntfsW
[]
=
{
'N'
,
'T'
,
'F'
,
'S'
};
/**************************************************************************
/**************************************************************************
* FILE_CreateFile (internal)
* FILE_CreateFile (internal)
...
@@ -2639,7 +2640,23 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, PIO_STATUS_BLOCK io
...
@@ -2639,7 +2640,23 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, PIO_STATUS_BLOCK io
}
}
break
;
break
;
case
FileFsAttributeInformation
:
case
FileFsAttributeInformation
:
FIXME
(
"%p: attribute info not supported
\n
"
,
handle
);
if
(
length
<
offsetof
(
FILE_FS_ATTRIBUTE_INFORMATION
,
FileSystemName
[
sizeof
(
ntfsW
)
/
sizeof
(
WCHAR
)]
))
io
->
u
.
Status
=
STATUS_BUFFER_TOO_SMALL
;
else
{
FILE_FS_ATTRIBUTE_INFORMATION
*
info
=
buffer
;
FIXME
(
"%p: faking attribute info
\n
"
,
handle
);
info
->
FileSystemAttribute
=
FILE_SUPPORTS_ENCRYPTION
|
FILE_FILE_COMPRESSION
|
FILE_PERSISTENT_ACLS
|
FILE_UNICODE_ON_DISK
|
FILE_CASE_PRESERVED_NAMES
|
FILE_CASE_SENSITIVE_SEARCH
;
info
->
MaximumComponentNameLength
=
MAXIMUM_FILENAME_LENGTH
-
1
;
info
->
FileSystemNameLength
=
sizeof
(
ntfsW
);
memcpy
(
info
->
FileSystemName
,
ntfsW
,
sizeof
(
ntfsW
));
io
->
Information
=
sizeof
(
*
info
);
io
->
u
.
Status
=
STATUS_SUCCESS
;
}
break
;
break
;
case
FileFsControlInformation
:
case
FileFsControlInformation
:
FIXME
(
"%p: control info not supported
\n
"
,
handle
);
FIXME
(
"%p: control info not supported
\n
"
,
handle
);
...
...
dlls/ntdll/tests/file.c
View file @
d53a55ea
...
@@ -1634,6 +1634,52 @@ todo_wine
...
@@ -1634,6 +1634,52 @@ todo_wine
CloseHandle
(
dir
);
CloseHandle
(
dir
);
}
}
static
void
test_query_attribute_information_file
(
void
)
{
NTSTATUS
status
;
HANDLE
dir
;
WCHAR
path
[
MAX_PATH
];
OBJECT_ATTRIBUTES
attr
;
IO_STATUS_BLOCK
io
;
UNICODE_STRING
nameW
;
FILE_FS_ATTRIBUTE_INFORMATION
*
ffai
;
BYTE
buf
[
sizeof
(
FILE_FS_ATTRIBUTE_INFORMATION
)
+
MAX_PATH
*
sizeof
(
WCHAR
)];
GetWindowsDirectoryW
(
path
,
MAX_PATH
);
pRtlDosPathNameToNtPathName_U
(
path
,
&
nameW
,
NULL
,
NULL
);
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
&
nameW
;
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
;
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
status
=
pNtOpenFile
(
&
dir
,
SYNCHRONIZE
|
FILE_LIST_DIRECTORY
,
&
attr
,
&
io
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
FILE_DIRECTORY_FILE
|
FILE_SYNCHRONOUS_IO_NONALERT
);
ok
(
!
status
,
"open %s failed %x
\n
"
,
wine_dbgstr_w
(
nameW
.
Buffer
),
status
);
pRtlFreeUnicodeString
(
&
nameW
);
ZeroMemory
(
buf
,
sizeof
(
buf
)
);
U
(
io
).
Status
=
0xdadadada
;
io
.
Information
=
0xcacacaca
;
status
=
pNtQueryVolumeInformationFile
(
dir
,
&
io
,
buf
,
sizeof
(
buf
),
FileFsAttributeInformation
);
ffai
=
(
FILE_FS_ATTRIBUTE_INFORMATION
*
)
buf
;
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
);
ok
(
ffai
->
FileSystemAttribute
!=
0
,
"Missing FileSystemAttribute
\n
"
);
ok
(
ffai
->
MaximumComponentNameLength
!=
0
,
"Missing MaximumComponentNameLength
\n
"
);
ok
(
ffai
->
FileSystemNameLength
!=
0
,
"Missing FileSystemNameLength
\n
"
);
trace
(
"FileSystemAttribute: %x MaximumComponentNameLength: %x FileSystemName: %s
\n
"
,
ffai
->
FileSystemAttribute
,
ffai
->
MaximumComponentNameLength
,
wine_dbgstr_wn
(
ffai
->
FileSystemName
,
ffai
->
FileSystemNameLength
/
sizeof
(
WCHAR
)));
CloseHandle
(
dir
);
}
static
void
test_NtCreateFile
(
void
)
static
void
test_NtCreateFile
(
void
)
{
{
static
const
struct
test_data
static
const
struct
test_data
...
@@ -1770,4 +1816,5 @@ START_TEST(file)
...
@@ -1770,4 +1816,5 @@ START_TEST(file)
test_file_name_information
();
test_file_name_information
();
test_file_all_name_information
();
test_file_all_name_information
();
test_query_volume_information_file
();
test_query_volume_information_file
();
test_query_attribute_information_file
();
}
}
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