Apply the dynamic SCSI buffer window sizing fix to MO, removable disk, and CD-ROM as well.

This commit is contained in:
OBattler
2025-09-07 01:12:30 +02:00
parent 113dfe3483
commit d46e2bc8c6
7 changed files with 36 additions and 6 deletions

View File

@@ -747,8 +747,17 @@ static void
rdisk_buf_alloc(rdisk_t *dev, const uint32_t len)
{
rdisk_log(dev->log, "Allocated buffer length: %i\n", len);
if (dev->buffer == NULL)
if (dev->buffer == NULL) {
dev->buffer = (uint8_t *) malloc(len);
dev->buffer_sz = len;
}
if (len > dev->buffer_sz) {
uint8_t *buf = (uint8_t *) realloc(dev->buffer, len);
dev->buffer = buf;
dev->buffer_sz = len;
}
}
static void