Re: New wsdisplay for playstation2
[email protected] (Jorge Acereda MaciĆ”) 28 Oct 2003 19:17:40 +0100
| Newsgroups | gmane.os.netbsd.ports.playstation2,gmane.os.netbsd.devel.kernel |
|---|---|
| Message-ID | <[email protected]> |
Matthias Drochner <[email protected]> writes: > [email protected] said: > > gsfb_mmap(void *v, off_t offset, int prot) { > > if (GSFB_BUFFER_SIZE >= (unsigned) offset) > > return NULL; > > I didn't look deeper, but this piece of code is wrong for two > reasons: > 1. the comparision is reverted > 2. returning NULL doesn't what you expect - probably you get > the physical page at 0 mapped > to return an error, use (-1) Oops, thanks a lot! BTW, I "inherited" the "return NULL;" from the previous arch/playstation2/ee/gsfb.c, so I guess it is also buggy.