On a 32bit system we can end up writing more than 256 blocks in a run when
we swap so blkdev needs to use 16bits for the block counter.
(We could make this a typedef for 8 v 16bit but it's not clear it matters
enough)
static int blkdev_transfer(uint8_t minor, uint8_t rawflag)
{
- uint8_t partition, n, count=0;
+ uint8_t partition, n;
+ uint16_t count = 0;
/* we trust that blkdev_open() has already verified that this minor number is valid */
blk_op.blkdev = &blkdev_table[minor >> 4];
uint8_t swap_page; /* page to pass to map_swap */
blkdev_t *blkdev; /* active block device */
uint32_t lba; /* LBA for first sectors to transfer */
- uint8_t nblock; /* number of sectors to transfer */
+ uint16_t nblock; /* number of sectors to transfer */
bool is_read; /* true: read sectors, false: write sectors */
};
/* macros that inline assembler code can use to access blkparam fields */