aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/ide.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ide.c b/hw/ide.c
index fc70f36967..e61cefb696 100644
--- a/hw/ide.c
+++ b/hw/ide.c
@@ -2788,11 +2788,11 @@ static void ide_init2(IDEState *ide_state,
for(i = 0; i < 2; i++) {
s = ide_state + i;
- s->io_buffer = qemu_memalign(512, IDE_DMA_BUF_SECTORS*512 + 4);
if (i == 0)
s->bs = hd0;
else
s->bs = hd1;
+ s->io_buffer = qemu_blockalign(s->bs, IDE_DMA_BUF_SECTORS*512 + 4);
if (s->bs) {
bdrv_get_geometry(s->bs, &nb_sectors);
bdrv_guess_geometry(s->bs, &cylinders, &heads, &secs);