[Qemu-devel] [PATCH 3/5] ide/atapi: Use table instead of switch for commands

2011-04-19 Thread Kevin Wolf
Signed-off-by: Kevin Wolf kw...@redhat.com --- hw/ide/atapi.c | 115 +++ 1 files changed, 48 insertions(+), 67 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index d161bf7..e8ac764 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@

Re: [Qemu-devel] [PATCH 3/5] ide/atapi: Use table instead of switch for commands

2011-04-19 Thread Amit Shah
On (Tue) 19 Apr 2011 [14:36:41], Kevin Wolf wrote: +struct { +void (*handler)(IDEState *s, uint8_t *buf); +int flags; +} atapi_cmd_table[0x100] = { +[ 0x00 ] = { cmd_test_unit_ready, 0 }, +[ 0x03 ] = { cmd_request_sense, ALLOW_UA }, +[ 0x12

Re: [Qemu-devel] [PATCH 3/5] ide/atapi: Use table instead of switch for commands

2011-04-19 Thread Kevin Wolf
Am 19.04.2011 15:20, schrieb Amit Shah: On (Tue) 19 Apr 2011 [14:36:41], Kevin Wolf wrote: +struct { +void (*handler)(IDEState *s, uint8_t *buf); +int flags; +} atapi_cmd_table[0x100] = { +[ 0x00 ] = { cmd_test_unit_ready, 0 }, +[ 0x03 ] = {