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 39263558a2088940aaacd6eda19ca23d40b63495.
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
From 7e55aac8ffe313d8e313b222d1bc670b51987441 Mon Sep 17 00:00:00 2001
|
||||
From 02050df2d792e003c28a302d23e7a464573c113c 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] ntdll: Implement storing DOS attributes in NtCreateFile.
|
||||
|
||||
---
|
||||
dlls/ntdll/tests/directory.c | 24 +++++++--------
|
||||
dlls/ntdll/unix/file.c | 59 ++++++++++++++++++++++++++++++------
|
||||
2 files changed, 61 insertions(+), 22 deletions(-)
|
||||
dlls/ntdll/tests/directory.c | 24 ++++++++---------
|
||||
dlls/ntdll/unix/file.c | 51 ++++++++++++++++++++++++++++++++----
|
||||
2 files changed, 57 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c
|
||||
index d21a2e64f8e..dc4f09729ac 100644
|
||||
index 6a423174664..fccd48f23e5 100644
|
||||
--- a/dlls/ntdll/tests/directory.c
|
||||
+++ b/dlls/ntdll/tests/directory.c
|
||||
@@ -55,7 +55,6 @@ static NTSTATUS (WINAPI *pRtlWow64EnableFsRedirectionEx)( ULONG disable, ULONG *
|
||||
@@ -58,10 +58,10 @@ index d21a2e64f8e..dc4f09729ac 100644
|
||||
}
|
||||
testfiles[i].nfound++;
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 0c3ff240c67..57175c7f3e4 100644
|
||||
index b2494d0343a..ad39732fd29 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -409,6 +409,26 @@ static int xattr_get( const char *path, const char *name, void *value, size_t si
|
||||
@@ -407,6 +407,26 @@ static int xattr_get( const char *path, const char *name, void *value, size_t si
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ index 0c3ff240c67..57175c7f3e4 100644
|
||||
/* get space from the current directory data buffer, allocating a new one if necessary */
|
||||
static void *get_dir_data_space( struct dir_data *data, unsigned int size )
|
||||
{
|
||||
@@ -3664,6 +3684,20 @@ static NTSTATUS unmount_device( HANDLE handle )
|
||||
@@ -3760,6 +3780,20 @@ static NTSTATUS unmount_device( HANDLE handle )
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -109,42 +109,27 @@ index 0c3ff240c67..57175c7f3e4 100644
|
||||
|
||||
/******************************************************************************
|
||||
* open_unix_file
|
||||
@@ -3706,6 +3740,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
ULONG attributes, ULONG sharing, ULONG disposition,
|
||||
ULONG options, void *ea_buffer, ULONG ea_length )
|
||||
{
|
||||
+ OBJECT_ATTRIBUTES nt_attr;
|
||||
UNICODE_STRING nt_name = { 0 };
|
||||
char *unix_name;
|
||||
BOOL created = FALSE;
|
||||
@@ -3749,17 +3784,17 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
@@ -3854,13 +3888,14 @@ 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)
|
||||
{
|
||||
- OBJECT_ATTRIBUTES nt_attr = *attr;
|
||||
-
|
||||
- if (nt_name.Buffer) nt_attr.ObjectName = &nt_name;
|
||||
- io->u.Status = open_unix_file( handle, unix_name, access, &nt_attr, attributes,
|
||||
- io->u.Status = open_unix_file( handle, unix_name, access, &new_attr, attributes,
|
||||
- sharing, disposition, options, ea_buffer, ea_length );
|
||||
- free( nt_name.Buffer );
|
||||
- free( unix_name );
|
||||
+ WARN( "%s not found (%x)\n", debugstr_us(attr->ObjectName), io->u.Status );
|
||||
+ return io->u.Status;
|
||||
}
|
||||
- else WARN( "%s not found (%x)\n", debugstr_us(attr->ObjectName), io->u.Status );
|
||||
+
|
||||
+ nt_attr = *attr;
|
||||
+ if (nt_name.Buffer) nt_attr.ObjectName = &nt_name;
|
||||
+ io->u.Status = open_unix_file( handle, unix_name, access, &nt_attr, attributes,
|
||||
+ io->u.Status = open_unix_file( handle, unix_name, access, &new_attr, attributes,
|
||||
+ sharing, disposition, options, ea_buffer, ea_length );
|
||||
+ free( nt_name.Buffer );
|
||||
|
||||
if (io->u.Status == STATUS_SUCCESS)
|
||||
{
|
||||
@@ -3781,6 +3816,11 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
@@ -3882,6 +3917,11 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
io->Information = FILE_OVERWRITTEN;
|
||||
break;
|
||||
}
|
||||
@@ -156,14 +141,14 @@ index 0c3ff240c67..57175c7f3e4 100644
|
||||
}
|
||||
else if (io->u.Status == STATUS_TOO_MANY_OPENED_FILES)
|
||||
{
|
||||
@@ -3788,6 +3828,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" );
|
||||
@@ -3890,6 +3930,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
}
|
||||
|
||||
free( nt_name.Buffer );
|
||||
+ free( unix_name );
|
||||
return io->u.Status;
|
||||
}
|
||||
|
||||
--
|
||||
2.20.1
|
||||
2.30.2
|
||||
|
||||
|
Reference in New Issue
Block a user