DISK: Clarify minor changes to sim_disk API in the documentation

This commit is contained in:
Mark Pizzolato 2022-02-10 07:10:08 -08:00
parent a94a9ac28f
commit 92b1efe50f
3 changed files with 1 additions and 5 deletions

Binary file not shown.

Binary file not shown.

View file

@ -2796,7 +2796,7 @@ if ((DK_GET_FMT (uptr) == DKUF_F_VHD) || (ctx->footer)) {
} }
else { /* Type already matches, Need to confirm compatibility */ else { /* Type already matches, Need to confirm compatibility */
t_addr saved_capac = uptr->capac; t_addr saved_capac = uptr->capac;
t_lba current_unit_sectors = (t_lba)((uptr->capac*ctx->capac_factor)/(ctx->sector_size/((dptr->flags & DEV_SECTORS) ? 512 : 1))); t_lba current_unit_sectors = (t_lba)((uptr->capac*ctx->capac_factor)/(ctx->sector_size/((dptr->flags & DEV_SECTORS) ? ctx->sector_size : 1)));
if ((container_sector_size != 0) && (sector_size != container_sector_size)) if ((container_sector_size != 0) && (sector_size != container_sector_size))
r = sim_messagef (SCPE_OPENERR, "%s: Incompatible Container Sector Size %d\n", sim_uname (uptr), container_sector_size); r = sim_messagef (SCPE_OPENERR, "%s: Incompatible Container Sector Size %d\n", sim_uname (uptr), container_sector_size);
@ -3990,8 +3990,6 @@ while (bytestoread) {
if (sectsread) if (sectsread)
*sectsread += sectorbytes / ctx->sector_size; *sectsread += sectorbytes / ctx->sector_size;
bytestoread -= sectorbytes; bytestoread -= sectorbytes;
if (bytestoread == 0)
break;
buf += sectorbytes; buf += sectorbytes;
addr += sectorbytes; addr += sectorbytes;
} }
@ -4192,8 +4190,6 @@ while (bytestoread) {
if (sectsread) if (sectsread)
*sectsread += sectorbytes / ctx->sector_size; *sectsread += sectorbytes / ctx->sector_size;
bytestoread -= sectorbytes; bytestoread -= sectorbytes;
if ((bytestoread == 0) || (bytesread == 0))
break;
buf += sectorbytes; buf += sectorbytes;
addr += sectorbytes; addr += sectorbytes;
} }