This reverts commit b64c20519d5826875679b6df85afebed27e1a9a8. Conflicts:
qemu/hw/ide.c (keep uint64_t total_sectors) Signed-off-by: Carlo Marcelo Arenas Belon <[EMAIL PROTECTED]> --- qemu/hw/ide.c | 27 ++++++++------------------- 1 files changed, 8 insertions(+), 19 deletions(-) diff --git a/qemu/hw/ide.c b/qemu/hw/ide.c index 90f2f2b..9a22db9 100644 --- a/qemu/hw/ide.c +++ b/qemu/hw/ide.c @@ -1640,7 +1640,6 @@ static void ide_atapi_cmd(IDEState *s) break; case GPCMD_GET_CONFIGURATION: { - uint32_t len; uint64_t total_sectors; /* only feature 0 is supported */ @@ -1649,27 +1648,17 @@ static void ide_atapi_cmd(IDEState *s) ASC_INV_FIELD_IN_CMD_PACKET); break; } - max_len = ube16_to_cpu(packet + 7); - bdrv_get_geometry(s->bs, &total_sectors); memset(buf, 0, 32); - if (total_sectors) { - if (total_sectors > 1433600) { - buf[7] = 0x10; /* DVD-ROM */ - } else { - buf[7] = 0x08; /* CD-ROM */ - } - } else { - buf[7] = 0x00; /* no current profile */ - } - buf[10] = 0x02 | 0x01; /* persistent and current */ - buf[11] = 0x08; /* size of profile list = 4 bytes per profile */ + bdrv_get_geometry(s->bs, &total_sectors); + buf[3] = 16; + buf[7] = total_sectors <= 1433600 ? 0x08 : 0x10; /* current profile */ + buf[10] = 0x10 | 0x1; + buf[11] = 0x08; /* size of profile list */ buf[13] = 0x10; /* DVD-ROM profile */ - buf[14] = buf[13] == buf[7]; /* (in)active */ + buf[14] = buf[7] == 0x10; /* (in)active */ buf[17] = 0x08; /* CD-ROM profile */ - buf[18] = buf[17] == buf[7]; /* (in)active */ - len = 8 + 4 + buf[11]; /* headers + size of profile list */ - cpu_to_ube32(buf, len - 4); /* data length */ - ide_atapi_cmd_reply(s, len, max_len); + buf[18] = buf[7] == 0x08; /* (in)active */ + ide_atapi_cmd_reply(s, 32, 32); break; } default: -- 1.5.3.7 ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel