*** buf_write.c.orig Thu Sep 10 07:59:47 1992 --- buf_write.c Wed Oct 5 07:20:11 1994 *************** *** 23,34 **** unsigned char *buf_ptr, *disk_ptr; char *memcpy(); void perror(), exit(), disk_flush(); ! long where, tail, lseek(); /* don't use cache? */ if (disk_size == 1) { where = (start * MSECTOR_SIZE) + disk_offset; ! if (lseek(fd, where, 0) < 0) { perror("disk_write: lseek"); exit(1); } --- 23,35 ---- unsigned char *buf_ptr, *disk_ptr; char *memcpy(); void perror(), exit(), disk_flush(); ! long where, tail; ! off_t lseek(); /* don't use cache? */ if (disk_size == 1) { where = (start * MSECTOR_SIZE) + disk_offset; ! if (lseek(fd, (off_t) where, 0) < 0) { perror("disk_write: lseek"); exit(1); } *************** *** 59,65 **** length = disk_size * MSECTOR_SIZE; /* move to next location */ ! if (lseek(fd, where, 0) < 0) { perror("disk_write: lseek"); exit(1); } --- 60,66 ---- length = disk_size * MSECTOR_SIZE; /* move to next location */ ! if (lseek(fd, (off_t) where, 0) < 0) { perror("disk_write: lseek"); exit(1); } *************** *** 88,101 **** disk_flush() { int len; ! long where, lseek(); void perror(), exit(); if (fd < 0 || disk_current < 0L || !disk_dirty) return; where = (disk_current * MSECTOR_SIZE) + disk_offset; ! if (lseek(fd, where, 0) < 0) { perror("disk_flush: lseek"); exit(1); } --- 89,103 ---- disk_flush() { int len; ! long where; ! off_t lseek(); void perror(), exit(); if (fd < 0 || disk_current < 0L || !disk_dirty) return; where = (disk_current * MSECTOR_SIZE) + disk_offset; ! if (lseek(fd, (off_t) where, 0) < 0) { perror("disk_flush: lseek"); exit(1); }