X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fide.c;h=246b1d484537edeee2fe3156553f1b1a59b5ed19;hp=7b13e5b6506d5fa3c51033f932f3a6d0b4c655b7;hb=0121a4503305424096e2b5c5bd3b6c3af2d813e5;hpb=ec01e0d8a7a3debd92ce2787a9d8bfd15d38df04 diff --git a/palacios/src/devices/ide.c b/palacios/src/devices/ide.c index 7b13e5b..246b1d4 100644 --- a/palacios/src/devices/ide.c +++ b/palacios/src/devices/ide.c @@ -1494,7 +1494,7 @@ static int connect_fn(struct guest_info * info, drive->num_sectors = 63; drive->num_heads = 16; - drive->num_cylinders = ops->get_capacity(private_data) / (drive->num_sectors * drive->num_heads); + drive->num_cylinders = (ops->get_capacity(private_data) / HD_SECTOR_SIZE) / (drive->num_sectors * drive->num_heads); } else { PrintError("invalid IDE drive type\n"); return -1;