From 33f002714be2ed58ed05ae3870d5ea6915df4b47 Mon Sep 17 00:00:00 2001 From: balrog Date: Mon, 24 Dec 2007 14:33:24 +0000 Subject: Add "cache" parameter to "-drive" (Laurent Vivier). git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3848 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/scsi-disk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/scsi-disk.c') diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 220b1997cc..b3e1ed71b0 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -46,7 +46,7 @@ typedef struct SCSIRequest { int sector_count; /* The amounnt of data in the buffer. */ int buf_len; - uint8_t dma_buf[SCSI_DMA_BUF_SIZE]; + uint8_t *dma_buf; BlockDriverAIOCB *aiocb; struct SCSIRequest *next; } SCSIRequest; @@ -78,6 +78,7 @@ static SCSIRequest *scsi_new_request(SCSIDeviceState *s, uint32_t tag) free_requests = r->next; } else { r = qemu_malloc(sizeof(SCSIRequest)); + r->dma_buf = qemu_memalign(512, SCSI_DMA_BUF_SIZE); } r->dev = s; r->tag = tag; -- cgit 1.4.1