[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 3/5] ide/atapi: Use table instead of switch f
From: |
Amit Shah |
Subject: |
Re: [Qemu-devel] [PATCH v2 3/5] ide/atapi: Use table instead of switch for commands |
Date: |
Mon, 25 Apr 2011 15:44:37 +0530 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On (Wed) 20 Apr 2011 [13:30:13], Kevin Wolf wrote:
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> 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..d0bf7fd 100644
> --- a/hw/ide/atapi.c
> +++ b/hw/ide/atapi.c
> @@ -533,10 +533,11 @@ static unsigned int event_status_media(IDEState *s,
> return 8; /* We wrote to 4 extra bytes from the header */
> }
>
> -static void handle_get_event_status_notification(IDEState *s,
> - uint8_t *buf,
> - const uint8_t *packet)
> +static void cmd_get_event_status_notification(IDEState *s,
> + uint8_t *buf)
> {
> + const uint8_t *packet = buf;
> +
Exploiting packet == buf. But do we want to go away from that?
Amit
- [Qemu-devel] [PATCH v2 0/5] atapi: Some code restructuring, Kevin Wolf, 2011/04/20
- [Qemu-devel] [PATCH v2 3/5] ide/atapi: Use table instead of switch for commands, Kevin Wolf, 2011/04/20
- [Qemu-devel] [PATCH v2 5/5] ide/atapi: Introduce CHECK_READY flag for commands, Kevin Wolf, 2011/04/20
- [Qemu-devel] [PATCH v2 2/5] ide/atapi: Factor commands out, Kevin Wolf, 2011/04/20
- [Qemu-devel] [PATCH v2 4/5] ide/atapi: Replace bdrv_get_geometry calls by s->nb_sectors, Kevin Wolf, 2011/04/20
- [Qemu-devel] [PATCH v2 1/5] ide: Split atapi.c out, Kevin Wolf, 2011/04/20