You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against caa41d4917a84dbbeb4aa14f18cfecfd17efe71a.
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
From 1deb289cab2a4271ec84b4636e39a467bd52b117 Mon Sep 17 00:00:00 2001
|
||||
From 1eb9ac00c49041448f53be5a6b4097222567a8af Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 20 Aug 2014 15:28:00 -0600
|
||||
Subject: [PATCH 3/7] ntdll: Implement storing DOS attributes in NtCreateFile.
|
||||
Subject: [PATCH] ntdll: Implement storing DOS attributes in NtCreateFile.
|
||||
|
||||
---
|
||||
dlls/ntdll/tests/directory.c | 24 ++++++------
|
||||
dlls/ntdll/unix/file.c | 74 +++++++++++++++++++++++-------------
|
||||
include/wine/port.h | 2 +
|
||||
libs/port/xattr.c | 20 ++++++++++
|
||||
4 files changed, 81 insertions(+), 39 deletions(-)
|
||||
dlls/ntdll/tests/directory.c | 24 +++++++++++-------------
|
||||
dlls/ntdll/unix/file.c | 25 ++++++++++++++++++++++++-
|
||||
include/wine/port.h | 2 ++
|
||||
libs/port/xattr.c | 20 ++++++++++++++++++++
|
||||
4 files changed, 57 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c
|
||||
index 248ed99ab20..e0f4debc624 100644
|
||||
@@ -60,10 +60,10 @@ index 248ed99ab20..e0f4debc624 100644
|
||||
}
|
||||
testfiles[i].nfound++;
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index d1f1b8c8f30..32653a110a2 100644
|
||||
index f1176717819..aee464fbd16 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -3580,6 +3580,20 @@ void CDECL set_show_dot_files( BOOL enable )
|
||||
@@ -3595,6 +3595,20 @@ void CDECL set_show_dot_files( BOOL enable )
|
||||
show_dot_files = enable;
|
||||
}
|
||||
|
||||
@@ -83,8 +83,8 @@ index d1f1b8c8f30..32653a110a2 100644
|
||||
+}
|
||||
|
||||
/******************************************************************************
|
||||
* NtCreateFile (NTDLL.@)
|
||||
@@ -3589,6 +3603,10 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
* open_unix_file
|
||||
@@ -3640,6 +3654,10 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
ULONG attributes, ULONG sharing, ULONG disposition,
|
||||
ULONG options, void *ea_buffer, ULONG ea_length )
|
||||
{
|
||||
@@ -95,68 +95,15 @@ index d1f1b8c8f30..32653a110a2 100644
|
||||
char *unix_name;
|
||||
BOOL created = FALSE;
|
||||
|
||||
@@ -3631,36 +3649,34 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
io->u.Status = STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
- if (io->u.Status == STATUS_SUCCESS)
|
||||
+ if (io->u.Status != STATUS_SUCCESS)
|
||||
@@ -3686,7 +3704,6 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
{
|
||||
- static UNICODE_STRING empty_string;
|
||||
- OBJECT_ATTRIBUTES unix_attr = *attr;
|
||||
- data_size_t len;
|
||||
- struct object_attributes *objattr;
|
||||
+ WARN("%s not found (%x)\n", debugstr_us(attr->ObjectName), io->u.Status );
|
||||
+ return io->u.Status;
|
||||
+ }
|
||||
|
||||
- unix_attr.ObjectName = &empty_string; /* we send the unix name instead */
|
||||
- if ((io->u.Status = alloc_object_attributes( &unix_attr, &objattr, &len )))
|
||||
- {
|
||||
- RtlFreeHeap( GetProcessHeap(), 0, unix_name );
|
||||
- return io->u.Status;
|
||||
- }
|
||||
- SERVER_START_REQ( create_file )
|
||||
- {
|
||||
- req->access = access;
|
||||
- req->sharing = sharing;
|
||||
- req->create = disposition;
|
||||
- req->options = options;
|
||||
- req->attrs = attributes;
|
||||
- wine_server_add_data( req, objattr, len );
|
||||
- wine_server_add_data( req, unix_name, strlen(unix_name) );
|
||||
- io->u.Status = wine_server_call( req );
|
||||
- *handle = wine_server_ptr_handle( reply->handle );
|
||||
- }
|
||||
- SERVER_END_REQ;
|
||||
- free( objattr );
|
||||
+ unix_attr = *attr;
|
||||
+ unix_attr.ObjectName = &empty_string; /* we send the unix name instead */
|
||||
+ if ((io->u.Status = alloc_object_attributes( &unix_attr, &objattr, &len )))
|
||||
+ {
|
||||
RtlFreeHeap( GetProcessHeap(), 0, unix_name );
|
||||
+ return io->u.Status;
|
||||
+ }
|
||||
+
|
||||
+ SERVER_START_REQ( create_file )
|
||||
+ {
|
||||
+ req->access = access;
|
||||
+ req->sharing = sharing;
|
||||
+ req->create = disposition;
|
||||
+ req->options = options;
|
||||
+ req->attrs = attributes;
|
||||
+ wine_server_add_data( req, objattr, len );
|
||||
+ wine_server_add_data( req, unix_name, strlen(unix_name) );
|
||||
+ io->u.Status = wine_server_call( req );
|
||||
+ *handle = wine_server_ptr_handle( reply->handle );
|
||||
io->u.Status = open_unix_file( handle, unix_name, access, attr, attributes,
|
||||
sharing, disposition, options, ea_buffer, ea_length );
|
||||
- RtlFreeHeap( GetProcessHeap(), 0, unix_name );
|
||||
}
|
||||
- else WARN( "%s not found (%x)\n", debugstr_us(attr->ObjectName), io->u.Status );
|
||||
+ SERVER_END_REQ;
|
||||
+ free( objattr );
|
||||
else WARN( "%s not found (%x)\n", debugstr_us(attr->ObjectName), io->u.Status );
|
||||
|
||||
if (io->u.Status == STATUS_SUCCESS)
|
||||
{
|
||||
@@ -3682,6 +3698,11 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
@@ -3710,6 +3727,11 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
io->Information = FILE_OVERWRITTEN;
|
||||
break;
|
||||
}
|
||||
@@ -168,7 +115,7 @@ index d1f1b8c8f30..32653a110a2 100644
|
||||
}
|
||||
else if (io->u.Status == STATUS_TOO_MANY_OPENED_FILES)
|
||||
{
|
||||
@@ -3689,6 +3710,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
@@ -3717,6 +3739,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
if (!once++) ERR_(winediag)( "Too many open files, ulimit -n probably needs to be increased\n" );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user