* mmap.cc (mmap): Remove obsolete check for MAP_SHARED|MAP_ANON as

being invalid.
This commit is contained in:
Corinna Vinschen 2001-01-29 13:39:17 +00:00
parent f977222f70
commit 68ea0dc2fc
2 changed files with 7 additions and 12 deletions

View File

@ -1,3 +1,8 @@
Mon Jan 29 14:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (mmap): Remove obsolete check for MAP_SHARED|MAP_ANON as
being invalid.
Mon Jan 29 10:23:00 2001 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (mmap_record::find_empty): Fix loop condition.

View File

@ -336,7 +336,6 @@ mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t off)
if (off % getpagesize ()
|| (!(flags & MAP_SHARED) && !(flags & MAP_PRIVATE))
|| ((flags & MAP_SHARED) && (flags & MAP_PRIVATE))
|| ((flags & MAP_SHARED) && (flags & MAP_ANONYMOUS))
|| ((flags & MAP_FIXED) && ((DWORD)addr % granularity))
|| !len)
{
@ -409,17 +408,8 @@ mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t off)
gran_len = fsiz;
}
else if (fh->get_device () == FH_ZERO)
{
/* mmap /dev/zero is like MAP_ANONYMOUS. */
if (flags & MAP_SHARED)
{
set_errno (EINVAL);
syscall_printf ("-1 = mmap(): EINVAL");
ReleaseResourceLock(LOCK_MMAP_LIST,READ_LOCK|WRITE_LOCK," mmap");
return MAP_FAILED;
}
fd = -1;
}
/* mmap /dev/zero is like MAP_ANONYMOUS. */
fd = -1;
}
if (fd == -1)
{