mmap() was a little strict: The length parameter need not be page

aligned. It shall be rounded up by the implementation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24967 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-04-15 14:22:50 +00:00
parent e806cb517a
commit 9b293bf653
+1 -1
View File
@@ -19,7 +19,7 @@ mmap(void* address, size_t length, int protection, int flags, int fd,
off_t offset)
{
// offset and length must be page-aligned
if (length == 0 || (offset | length) % B_PAGE_SIZE != 0) {
if (length == 0 || offset % B_PAGE_SIZE != 0) {
errno = B_BAD_VALUE;
return MAP_FAILED;
}