mmap fails with error 22
Rob Landley
rob at landley.net
Fri Apr 13 16:23:51 UTC 2007
On Friday 13 April 2007 3:00 am, Geerts Steven wrote:
> Hi Rob
>
> Thanks for the reply, but it's still not working however.
>
> If I do the following however it works:
>
> /* check if offset is page aligned */
> if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1))
> return MAP_FAILED;
> return (__ptr_t) _mmap (addr, len, prot, flags,
> fd,(off_t) (((1 <<
> MMAP2_PAGE_SHIFT) -1 )&(offset >> MMAP2_PAGE_SHIFT)))
>
> In memory before I got the following addres: FFFB8000 this will now be
> changed to 000B8000 which will work!
>
> is this a good patch or not?
I don't know, could you send it _as_ a patch? (What file did you change?
Where in that file did the change go? What did it look like before and
after?) "diff -u" output is the standard way we take that sort of thing...
Thanks,
Rob
--
Penguicon 5.0 Apr 20-22, Linux Expo/SF Convention. Bruce Schneier, Christine
Peterson, Steve Jackson, Randy Milholland, Elizabeth Bear, Charlie Stross...
More information about the uClibc
mailing list