X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fatapi.h;h=b41e9dff5ee72a52d69092c7dc1f7167a03b27b9;hb=e9fc46a873dfb004c61cb1f245420e7ebcfad575;hp=4962119a59840d537e95086ecbefda90cce7bb49;hpb=6b32ab71071174408dba942dab82adc2c8324643;p=palacios-OLD.git diff --git a/palacios/src/devices/atapi.h b/palacios/src/devices/atapi.h index 4962119..b41e9df 100644 --- a/palacios/src/devices/atapi.h +++ b/palacios/src/devices/atapi.h @@ -247,7 +247,7 @@ static int atapi_get_capacity(struct ide_internal * ide, struct ide_channel * ch struct atapi_rd_capacity_resp * resp = (struct atapi_rd_capacity_resp *)(drive->data_buf); uint32_t capacity = drive->ops->get_capacity(drive->private_data); - resp->lba = le_to_be_32(capacity / ATAPI_BLOCK_SIZE); + resp->lba = le_to_be_32((capacity / ATAPI_BLOCK_SIZE) - 1); resp->block_len = le_to_be_32(ATAPI_BLOCK_SIZE); atapi_setup_cmd_resp(ide, channel, sizeof(struct atapi_rd_capacity_resp));