- if (lseek (info->fd, info->pos_buf, SEEK_SET) == -1)
- {
- logf (LOG_FATAL|LOG_ERRNO, "lseek %s", info->fname);
- exit (1);
- }
- count = info->buf_size;
- if (count > info->pos_end - info->pos_buf)
- count = info->pos_end - info->pos_buf;
- if ((r = write (info->fd, info->buf_mem, count)) < count)
- {
- if (r == -1)
- logf (LOG_FATAL|LOG_ERRNO, "read %s", info->fname);
- else
- logf (LOG_FATAL, "write of %ld but got %ld",
- (long) count, (long) r);
- exit (1);
- }
- info->dirty = 0;
+ if (lseek(info->fd, info->pos_buf, SEEK_SET) == -1)
+ {
+ yaz_log(YLOG_FATAL|YLOG_ERRNO, "rstemp: lseek (1) %s", info->fname);
+ zebra_exit("r_flusxh");