- /* FIXME: Test results of lseek() */
- lseek(mdp->fd, foffset + mapbytes - 1, SEEK_SET);
- test = write(mdp->fd, &buf, 1);
- if (test == -1) {
+ if (lseek(mdp->fd, foffset + mapbytes - 1, SEEK_SET) == -1) {
+ fprintf(stderr, "Internal error: lseek into mmap'ed fd failed! error: %s", strerror(errno));
+ abort();
+ }
+ if (write(mdp->fd, &buf, 1) == -1) {