diff --git a/stand/libsa/dosfs.c b/stand/libsa/dosfs.c --- a/stand/libsa/dosfs.c +++ b/stand/libsa/dosfs.c @@ -155,7 +155,7 @@ static int fatcnt(DOS_FS *, u_int); static int fatget(DOS_FS *, u_int *); static int fatend(u_int, u_int); -static int ioread(DOS_FS *, u_int, void *, size_t); +static int ioread(DOS_FS *, size_t, void *, size_t); static int ioget(struct open_file *, daddr_t, void *, size_t); static int @@ -405,7 +405,7 @@ } if (!clus || (n = f->fs->bsize - off) > cnt) n = cnt; - if ((err = ioread(f->fs, (c ? blkoff(f->fs, c) : + if ((err = ioread(f->fs, (c ? blkoff(f->fs, (size_t)c) : secbyt(f->fs->lsndir)) + off, buf, n))) goto out; f->offset += n; @@ -911,10 +911,10 @@ * Offset-based I/O primitive */ static int -ioread(DOS_FS *fs, u_int offset, void *buf, size_t nbyte) +ioread(DOS_FS *fs, size_t offset, void *buf, size_t nbyte) { char *s; - u_int off, n; + size_t off, n; int err; u_char local_buf[SECSIZ];