VirtualBox

Changeset 60553 in vbox for trunk/src/VBox/Devices/Storage


Ignore:
Timestamp:
Apr 18, 2016 6:09:55 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
106682
Message:

BusLogic: Emulation improvements, thanks to Tomas Hurka.

File:
1 edited

Legend:

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

    r60026 r60553  
    17251725            break;
    17261726        }
     1727        case BUSLOGICCOMMAND_SET_SCSI_SELECTION_TIMEOUT:
     1728        {
     1729            /* no-op */
     1730            pBusLogic->cbReplyParametersLeft = 0;
     1731            break;
     1732        }
    17271733        case BUSLOGICCOMMAND_MODIFY_IO_ADDRESS:
    17281734        {
     
    18161822            /* The reply length is set by the guest and is found in the first byte of the command buffer. */
    18171823            pBusLogic->cbReplyParametersLeft = pBusLogic->aCommandBuffer[0];
    1818             memset(pBusLogic->aReplyBuffer, ' ', pBusLogic->cbReplyParametersLeft);
    1819             const char aModelName[] = "958";
    1820             int cCharsToTransfer =   (pBusLogic->cbReplyParametersLeft <= (sizeof(aModelName) - 1))
     1824            memset(pBusLogic->aReplyBuffer, 0, pBusLogic->cbReplyParametersLeft);
     1825            const char aModelName[] = "958";    /* Trailing \0 is fine, that's the filler anyway. */
     1826            int cCharsToTransfer =   pBusLogic->cbReplyParametersLeft <= sizeof(aModelName)
    18211827                                   ? pBusLogic->cbReplyParametersLeft
    1822                                    : sizeof(aModelName) - 1;
     1828                                   : sizeof(aModelName);
    18231829
    18241830            for (int i = 0; i < cCharsToTransfer; i++)
     
    23122318                    case BUSLOGICCOMMAND_WRITE_BUSMASTER_CHIP_FIFO:
    23132319                        pBusLogic->cbCommandParametersLeft = 3;
     2320                        break;
     2321                    case BUSLOGICCOMMAND_SET_SCSI_SELECTION_TIMEOUT:
     2322                        pBusLogic->cbCommandParametersLeft = 4;
    23142323                        break;
    23152324                    case BUSLOGICCOMMAND_INITIALIZE_MAILBOX:
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