Re: [Qemu-devel] [PATCH 1/5] char: Add a QemuChrHandlers struct to initialise chardev handlers

2011-01-13 Thread Blue Swirl
On Thu, Jan 13, 2011 at 6:14 AM, Amit Shah amit.s...@redhat.com wrote: On (Wed) Jan 12 2011 [19:03:58], Blue Swirl wrote: +static QemuChrHandlers null_handlers = { +    /* All handlers are initialised to NULL */ +}; +  void qemu_chr_add_handlers(CharDriverState *s, -                  

Re: [Qemu-devel] [PATCH 1/5] char: Add a QemuChrHandlers struct to initialise chardev handlers

2011-01-12 Thread Blue Swirl
On Wed, Jan 12, 2011 at 6:01 PM, Michael Roth mdr...@linux.vnet.ibm.com wrote: On 01/12/2011 12:07 AM, Amit Shah wrote: On (Tue) Jan 11 2011 [17:13:15], Blue Swirl wrote: +static QemuChrHandlers gdb_handlers = { +    .fd_can_read = gdb_chr_can_receive, +    .fd_read = gdb_chr_receive, +    

Re: [Qemu-devel] [PATCH 1/5] char: Add a QemuChrHandlers struct to initialise chardev handlers

2011-01-12 Thread Amit Shah
On (Wed) Jan 12 2011 [19:03:58], Blue Swirl wrote: +static QemuChrHandlers null_handlers = { +    /* All handlers are initialised to NULL */ +}; +  void qemu_chr_add_handlers(CharDriverState *s, -                           IOCanReadHandler *fd_can_read, -                          

[Qemu-devel] [PATCH 1/5] char: Add a QemuChrHandlers struct to initialise chardev handlers

2011-01-11 Thread Amit Shah
Instead of passing each handler in the qemu_add_handlers() function, create a struct of handlers that can be passed to the function instead. Signed-off-by: Amit Shah amit.s...@redhat.com --- gdbstub.c|9 +++-- hw/debugcon.c|2 +- hw/escc.c|9

Re: [Qemu-devel] [PATCH 1/5] char: Add a QemuChrHandlers struct to initialise chardev handlers

2011-01-11 Thread Blue Swirl
On Tue, Jan 11, 2011 at 11:10 AM, Amit Shah amit.s...@redhat.com wrote: Instead of passing each handler in the qemu_add_handlers() function, create a struct of handlers that can be passed to the function instead. Signed-off-by: Amit Shah amit.s...@redhat.com ---  gdbstub.c            |    9

Re: [Qemu-devel] [PATCH 1/5] char: Add a QemuChrHandlers struct to initialise chardev handlers

2011-01-11 Thread Amit Shah
On (Tue) Jan 11 2011 [17:13:15], Blue Swirl wrote: +static QemuChrHandlers gdb_handlers = { +    .fd_can_read = gdb_chr_can_receive, +    .fd_read = gdb_chr_receive, +    .fd_event = gdb_chr_event, +}; These structures should be const. Hm, I had that but looks like it got lost in