From: Erik van der Kouwe Date: Fri, 26 Nov 2010 16:59:03 +0000 (-0600) Subject: NVRAM keeps a reference to IDE to query its geometry. It passes the device pointer... X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=2a587b8b87f1659470785b5eb4f782a1e7334f82;p=palacios.git NVRAM keeps a reference to IDE to query its geometry. It passes the device pointer to v3_ide_get_geometry while IDE expects to get the private pointer. This patch fixes that. --- diff --git a/palacios/src/devices/nvram.c b/palacios/src/devices/nvram.c index 978db46..352782f 100644 --- a/palacios/src/devices/nvram.c +++ b/palacios/src/devices/nvram.c @@ -542,7 +542,7 @@ static void init_harddrives(struct nvram_internal * nvram) { // It looks like the BIOS only tracks the disks on the first channel at 0x12? for (i = 0; i < 2; i++) { - if (v3_ide_get_geometry(nvram->ide, 0, i, &cyls, &heads, §s) == 0) { + if (v3_ide_get_geometry(nvram->ide->private_data, 0, i, &cyls, &heads, §s) == 0) { int info_reg = info_base_reg + (i * 9); @@ -583,7 +583,7 @@ static void init_harddrives(struct nvram_internal * nvram) { int drive_num = i % 2; uint32_t tmp[3]; - if (v3_ide_get_geometry(nvram->ide, chan_num, drive_num, &tmp[0], &tmp[1], &tmp[2]) == 0) { + if (v3_ide_get_geometry(nvram->ide->private_data, chan_num, drive_num, &tmp[0], &tmp[1], &tmp[2]) == 0) { trans |= TRANSLATE_LBA << (i * 2); } }