Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
M17N
jfbterm
jfbterm-0.4.7-mmap-newkernel.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File jfbterm-0.4.7-mmap-newkernel.patch of Package jfbterm
--- jfbterm-0.4.7/fbcommon.c.mmap 2006-07-27 17:19:12.000000000 +0900 +++ jfbterm-0.4.7/fbcommon.c 2006-07-27 20:32:21.000000000 +0900 @@ -564,21 +564,34 @@ p->moff = (u_long)(fb_fix.mmio_start) & (~PAGE_MASK); p->mlen = (fb_fix.mmio_len + p->moff + ~PAGE_MASK) & PAGE_MASK; + +#if 0 /* This code is dead... perhaps? */ p->mmio = (u_char*)mmap(NULL, p->mlen, PROT_READ|PROT_WRITE, MAP_SHARED, p->fh, p->slen); if ((long)p->mmio == -1) { + /* mmap with length 0 returns EINVAL on > linux 2.6.12 */ + if (!p->mlen){ + if (p->moff) { + print_message("possible memory corruption\n"); + abort(); + } + } else { #ifdef JFB_MMIO_CHECK die("cannot mmap(mmio)"); #else print_message("cannot mmap(mmio) : %s\n", strerror(errno)); #endif + } } p->mmio = p->mmio + p->moff; +#endif #ifdef DEBUG print_message("mmap ; %d - %p\n", p->slen, p->smem); +#if 0 print_message("mmio ; %d - %p\n", p->mlen, p->mmio); #endif +#endif /* move viewport to upper left corner */ if (fb_var.xoffset != 0 || fb_var.yoffset != 0) { @@ -610,9 +623,11 @@ if ((long)p->smem != -1) { munmap((caddr_t)((u_long)p->smem & PAGE_MASK), p->slen); } +#if 0 if ((long)p->mmio != -1) { munmap((caddr_t)((u_long)p->mmio & PAGE_MASK), p->mlen); } +#endif if (cmapSaved == TRUE) { tfbm_put_cmap(p->fh, &ocmap); cmapSaved = FALSE;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor