* mmap.cc (fhandler_disk_file::mmap): Use `addr' correctly.

* fhandler_mem.cc (fhandler_dev_mem::mmap): Ditto.
This commit is contained in:
Corinna Vinschen 2001-02-23 09:49:19 +00:00
parent 55a96ae8b3
commit 675412e9d6
3 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
Fri Feb 23 10:42:00 2001 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (fhandler_disk_file::mmap): Use `addr' correctly.
* fhandler_mem.cc (fhandler_dev_mem::mmap): Ditto.
Thu Feb 22 17:09:00 2001 Corinna Vinschen <corinna@vinschen.de> Thu Feb 22 17:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
* path.cc (symlink): Keep relative paths relative in the DOS * path.cc (symlink): Keep relative paths relative in the DOS

View File

@ -332,7 +332,7 @@ fhandler_dev_mem::mmap (caddr_t *addr, size_t len, DWORD access,
syscall_printf ("-1 = mmap(): NtMapViewOfSection failed with %E"); syscall_printf ("-1 = mmap(): NtMapViewOfSection failed with %E");
return INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }
if ((flags & MAP_FIXED) && base != addr) if ((flags & MAP_FIXED) && base != *addr)
{ {
set_errno (EINVAL); set_errno (EINVAL);
syscall_printf ("-1 = mmap(): address shift with MAP_FIXED given"); syscall_printf ("-1 = mmap(): address shift with MAP_FIXED given");

View File

@ -729,9 +729,9 @@ fhandler_disk_file::mmap (caddr_t *addr, size_t len, DWORD access,
} }
void *base = MapViewOfFileEx (h, access, 0, off, len, void *base = MapViewOfFileEx (h, access, 0, off, len,
(flags & MAP_FIXED) ? addr : NULL); (flags & MAP_FIXED) ? *addr : NULL);
if (!base || ((flags & MAP_FIXED) && base != addr)) if (!base || ((flags & MAP_FIXED) && base != *addr))
{ {
if (!base) if (!base)
{ {