Commit c237db98 authored by Joel Holdsworth's avatar Joel Holdsworth Committed by Alexandre Julliard

ntdll: Initial implementation of FileLinkInformationEx.

parent c7b1551e
...@@ -4830,13 +4830,23 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, ...@@ -4830,13 +4830,23 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
break; break;
case FileLinkInformation: case FileLinkInformation:
case FileLinkInformationEx:
if (len >= sizeof(FILE_LINK_INFORMATION)) if (len >= sizeof(FILE_LINK_INFORMATION))
{ {
FILE_LINK_INFORMATION *info = ptr; FILE_LINK_INFORMATION *info = ptr;
unsigned int flags;
UNICODE_STRING name_str, redir; UNICODE_STRING name_str, redir;
OBJECT_ATTRIBUTES attr; OBJECT_ATTRIBUTES attr;
char *unix_name; char *unix_name;
if (class == FileLinkInformation)
flags = info->ReplaceIfExists ? FILE_LINK_REPLACE_IF_EXISTS : 0;
else
flags = info->Flags;
if (flags & ~FILE_LINK_REPLACE_IF_EXISTS)
FIXME( "unsupported flags: %#x\n", flags );
name_str.Buffer = info->FileName; name_str.Buffer = info->FileName;
name_str.Length = info->FileNameLength; name_str.Length = info->FileNameLength;
name_str.MaximumLength = info->FileNameLength + sizeof(WCHAR); name_str.MaximumLength = info->FileNameLength + sizeof(WCHAR);
...@@ -4852,7 +4862,7 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, ...@@ -4852,7 +4862,7 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
req->rootdir = wine_server_obj_handle( attr.RootDirectory ); req->rootdir = wine_server_obj_handle( attr.RootDirectory );
req->namelen = attr.ObjectName->Length; req->namelen = attr.ObjectName->Length;
req->link = TRUE; req->link = TRUE;
req->flags = info->ReplaceIfExists ? FILE_LINK_REPLACE_IF_EXISTS : 0; req->flags = flags;
wine_server_add_data( req, attr.ObjectName->Buffer, attr.ObjectName->Length ); wine_server_add_data( req, attr.ObjectName->Buffer, attr.ObjectName->Length );
wine_server_add_data( req, unix_name, strlen(unix_name) ); wine_server_add_data( req, unix_name, strlen(unix_name) );
status = wine_server_call( req ); status = wine_server_call( req );
......
...@@ -794,6 +794,7 @@ NTSTATUS WINAPI wow64_NtSetInformationFile( UINT *args ) ...@@ -794,6 +794,7 @@ NTSTATUS WINAPI wow64_NtSetInformationFile( UINT *args )
case FileRenameInformation: /* FILE_RENAME_INFORMATION */ case FileRenameInformation: /* FILE_RENAME_INFORMATION */
case FileRenameInformationEx: /* FILE_RENAME_INFORMATION */ case FileRenameInformationEx: /* FILE_RENAME_INFORMATION */
case FileLinkInformation: /* FILE_LINK_INFORMATION */ case FileLinkInformation: /* FILE_LINK_INFORMATION */
case FileLinkInformationEx: /* FILE_LINK_INFORMATION */
if (len >= sizeof(FILE_RENAME_INFORMATION32)) if (len >= sizeof(FILE_RENAME_INFORMATION32))
{ {
OBJECT_ATTRIBUTES attr; OBJECT_ATTRIBUTES attr;
......
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