Rebase against 634cb775c27b61ad6ce1fbe3e9972b0edfa31dcb.

This commit is contained in:
Zebediah Figura
2020-06-15 17:43:18 -05:00
parent b6595d9e28
commit 32fcc0d75b
19 changed files with 182 additions and 461 deletions

View File

@@ -1,27 +1,27 @@
From ed63a76dc481da8af510fb8f9ae6c399ca0ca0ac Mon Sep 17 00:00:00 2001
From b956b7f35f07153aa61a9a57a1b5bb7f2f9d1e8b Mon Sep 17 00:00:00 2001
From: Qian Hong <qhong@codeweavers.com>
Date: Fri, 21 Aug 2015 21:58:51 +0800
Subject: [PATCH] ntdll: Set EOF on file which has a memory mapping should
fail.
---
dlls/ntdll/file.c | 27 ++++++----------------
server/fd.c | 55 +++++++++++++++++++++++++++++++++++++++++++++
server/protocol.def | 7 ++++++
3 files changed, 69 insertions(+), 20 deletions(-)
dlls/ntdll/unix/file.c | 23 ++++--------------
server/fd.c | 55 ++++++++++++++++++++++++++++++++++++++++++
server/protocol.def | 7 ++++++
3 files changed, 67 insertions(+), 18 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 013706889bb..a28ae265687 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -2747,30 +2747,17 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index d39ca8cd635..b0ec1ff3f5f 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -4038,28 +4038,15 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
case FileEndOfFileInformation:
if (len >= sizeof(FILE_END_OF_FILE_INFORMATION))
{
- struct stat st;
const FILE_END_OF_FILE_INFORMATION *info = ptr;
- if ((io->u.Status = unix_funcs->server_get_unix_fd( handle, 0, &fd, &needs_close, NULL, NULL )))
- if ((io->u.Status = server_get_unix_fd( handle, 0, &fd, &needs_close, NULL, NULL )))
- return io->u.Status;
-
- /* first try normal truncate */
@@ -41,22 +41,18 @@ index 013706889bb..a28ae265687 100644
+ req->eof = info->EndOfFile.QuadPart;
+ io->u.Status = wine_server_call( req );
}
- io->u.Status = FILE_GetNtStatus();
- io->u.Status = errno_to_status( errno );
-
- if (needs_close) close( fd );
- }
- else io->u.Status = STATUS_INVALID_PARAMETER_3;
+ SERVER_END_REQ;
+ } else
+ io->u.Status = STATUS_INVALID_PARAMETER_3;
}
else io->u.Status = STATUS_INVALID_PARAMETER_3;
break;
case FilePipeInformation:
diff --git a/server/fd.c b/server/fd.c
index 06d1d81bdb0..7b016acb382 100644
index 7ea8ac273e5..3a92ca5fd48 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -2534,6 +2534,50 @@ failed:
@@ -2574,6 +2574,50 @@ failed:
free( name );
}
@@ -107,7 +103,7 @@ index 06d1d81bdb0..7b016acb382 100644
struct completion *fd_get_completion( struct fd *fd, apc_param_t *p_key )
{
*p_key = fd->comp_key;
@@ -2812,3 +2856,14 @@ DECL_HANDLER(set_fd_name_info)
@@ -2852,3 +2896,14 @@ DECL_HANDLER(set_fd_name_info)
}
if (root_fd) release_object( root_fd );
}
@@ -123,10 +119,10 @@ index 06d1d81bdb0..7b016acb382 100644
+ }
+}
diff --git a/server/protocol.def b/server/protocol.def
index 423e6079009..c6110fc675e 100644
index c3442c06e9b..80ca76f9271 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3821,6 +3821,13 @@ struct handle_info
@@ -3822,6 +3822,13 @@ struct handle_info
@END
@@ -141,5 +137,5 @@ index 423e6079009..c6110fc675e 100644
@REQ(get_window_layered_info)
user_handle_t handle; /* handle to the window */
--
2.26.2
2.27.0