Module: wine Branch: master Commit: a39ac0a701d6a4d0d10b1ea54360fe101164f695 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a39ac0a701d6a4d0d10b1ea543...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Jan 3 13:20:03 2008 +0100
ntdll: Print an error for unsupported shared writable mappings.
---
dlls/ntdll/virtual.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index b5e236f..cbd524a 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -824,7 +824,12 @@ static NTSTATUS map_file_into_view( struct file_view *view, int fd, size_t start /* page-aligned (EINVAL), or because the underlying filesystem */ /* does not support mmap() (ENOEXEC,ENODEV), we do it by hand. */ if ((errno != ENOEXEC) && (errno != EINVAL) && (errno != ENODEV)) return FILE_GetNtStatus(); - if (shared_write) return FILE_GetNtStatus(); /* we cannot fake shared write mappings */ + if (shared_write) /* we cannot fake shared write mappings */ + { + if (errno == EINVAL) return STATUS_INVALID_PARAMETER; + ERR( "shared writable mmap not supported, broken filesystem?\n" ); + return STATUS_NOT_SUPPORTED; + } }
/* Reserve the memory with an anonymous mmap */