Apply the dynamic SCSI buffer window sizing fix to MO, removable disk, and CD-ROM as well.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user