VirtualBox

Changeset 104189 in vbox


Ignore:
Timestamp:
Apr 5, 2024 1:25:56 PM (10 months ago)
Author:
vboxsync
Message:

DevFdc: If EOT is below starting sector, make it more explicit what's going on.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevFdc.cpp

    r103883 r104189  
    12891289        int tmp;
    12901290        fdctrl->data_len = 128 << (fdctrl->fifo[5] > 7 ? 7 : fdctrl->fifo[5]);
    1291         tmp = (fdctrl->fifo[6] - ks + 1);
    1292         if (fdctrl->fifo[0] & 0x80)
    1293             tmp += fdctrl->fifo[6];
     1291        if (fdctrl->fifo[6] >= ks) {
     1292            /* EOT is beyond the starting sector */
     1293            tmp = (fdctrl->fifo[6] - ks + 1);
     1294            if (fdctrl->fifo[0] & 0x80)
     1295                tmp += fdctrl->fifo[6];
     1296        } else {
     1297            /* EOT is below starting sector; keep going until we run out of sectors. */
     1298            tmp = 255;
     1299        }
    12941300        fdctrl->data_len *= tmp;
    12951301    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette