From: Alan Cox Date: Mon, 29 Aug 2016 11:33:34 +0000 (+0100) Subject: z80pack: fix bugs introduced with block param cleanups X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=ae6aec451a50de9b263f9717f33ef13e1b4649c1;p=FUZIX.git z80pack: fix bugs introduced with block param cleanups --- diff --git a/Kernel/dev/z80pack/devfd.c b/Kernel/dev/z80pack/devfd.c index a0042a51..12d09ece 100644 --- a/Kernel/dev/z80pack/devfd.c +++ b/Kernel/dev/z80pack/devfd.c @@ -89,12 +89,14 @@ static int fd_transfer(bool is_read, uint8_t minor, uint8_t rawflag) * a swap, or to perform mapping games using the banks */ udata.u_nblock *= (BLKSIZE / 128); + /* Limits us to 2^14 blocks (16MB) */ + udata.u_block <<= 2; #endif } else { /* rawflag == 0 */ udata.u_nblock = BLKSIZE / 128; /* BLKSIZE bytes implied */ + /* Limits us to 2^14 blocks (16MB) */ + udata.u_block <<= 2; } - /* Limits us to 2^14 blocks (8MB) */ - udata.u_nblock <<= 2; /* Read the disk in four sector chunks. FIXME We ought to cache the geometry and just bump sector checking for a wrap. */