*
* This software may be freely distributed and used according to the terms
* of the GNU Lesser General Public License.
*
* This software may be freely distributed and used according to the terms
* of the GNU Lesser General Public License.
munmap(p->start_map, p->end_off - p->start_off);
uns win = PARTMAP_WINDOW;
ASSERT(win >= size);
munmap(p->start_map, p->end_off - p->start_off);
uns win = PARTMAP_WINDOW;
ASSERT(win >= size);
p->start_map = sh_mmap(NULL, win, p->writeable ? (PROT_READ | PROT_WRITE) : PROT_READ, MAP_SHARED, p->fd, start);
if (p->start_map == MAP_FAILED)
die("mmap failed at position %Ld: %m", (long long)start);
p->start_map = sh_mmap(NULL, win, p->writeable ? (PROT_READ | PROT_WRITE) : PROT_READ, MAP_SHARED, p->fd, start);
if (p->start_map == MAP_FAILED)
die("mmap failed at position %Ld: %m", (long long)start);