Re: [Qemu-devel] [PATCH v2] chardev: add hotplug support.

2012-10-16 Thread Paolo Bonzini
Il 15/10/2012 19:36, Eric Blake ha scritto: >>> >> +## >>> >> +# @chardev_del: > And this should be 'chardev-del' or even 'chardev-remove', as QMP > commands tend to favor legibility over abbreviations. In doubt we should favor consistency though (with netdev_add and netdev_del). I'm for keeping

Re: [Qemu-devel] [PATCH v2] chardev: add hotplug support.

2012-10-16 Thread Luiz Capitulino
On Mon, 15 Oct 2012 13:09:55 +0200 Andreas Färber wrote: > Am 15.10.2012 08:51, schrieb Lei Li: > > On 10/12/2012 08:39 PM, Gerd Hoffmann wrote: > >> +void qmp_chardev_del(const char *id, Error **errp) > >> +{ > >> +CharDriverState *chr; > >> + > >> +chr = qemu_chr_find(id); > >> +if

Re: [Qemu-devel] [PATCH v2] chardev: add hotplug support.

2012-10-15 Thread Eric Blake
On 10/15/2012 12:51 AM, Lei Li wrote: > On 10/12/2012 08:39 PM, Gerd Hoffmann wrote: >> This patch adds chardev_add and chardev_del monitor commands. >> >> chardev_del is pretty straight forward, it just takes an id argument and >> zaps the chardev specified. >> >> chardev_add is more tricky as the

Re: [Qemu-devel] [PATCH v2] chardev: add hotplug support.

2012-10-15 Thread Andreas Färber
Am 15.10.2012 08:51, schrieb Lei Li: > On 10/12/2012 08:39 PM, Gerd Hoffmann wrote: >> +void qmp_chardev_del(const char *id, Error **errp) >> +{ >> +CharDriverState *chr; >> + >> +chr = qemu_chr_find(id); >> +if (NULL == chr) { >> +error_setg(errp, "Chardev '%s' not found\n", id

Re: [Qemu-devel] [PATCH v2] chardev: add hotplug support.

2012-10-14 Thread Lei Li
On 10/12/2012 08:39 PM, Gerd Hoffmann wrote: This patch adds chardev_add and chardev_del monitor commands. chardev_del is pretty straight forward, it just takes an id argument and zaps the chardev specified. chardev_add is more tricky as there are tons of arguments for the different backends.

Re: [Qemu-devel] [PATCH v2] chardev: add hotplug support.

2012-10-12 Thread Paolo Bonzini
Il 12/10/2012 18:54, Paolo Bonzini ha scritto: > Il 12/10/2012 14:39, Gerd Hoffmann ha scritto: >> +chr = qemu_chr_new_from_opts(opts, NULL); >> +if (chr == NULL) { >> +qemu_opts_del(opts); >> +error_setg(&err, "Creating chardev failed\n"); >> +goto exit_err; >> +

Re: [Qemu-devel] [PATCH v2] chardev: add hotplug support.

2012-10-12 Thread Paolo Bonzini
Il 12/10/2012 14:39, Gerd Hoffmann ha scritto: > +chr = qemu_chr_new_from_opts(opts, NULL); > +if (chr == NULL) { > +qemu_opts_del(opts); > +error_setg(&err, "Creating chardev failed\n"); > +goto exit_err; > +} > +return 0; > + Since you have to do a v3, ple

Re: [Qemu-devel] [PATCH v2] chardev: add hotplug support.

2012-10-12 Thread Gerd Hoffmann
On 10/12/12 14:39, Gerd Hoffmann wrote: > This patch adds chardev_add and chardev_del monitor commands. > > chardev_del is pretty straight forward, it just takes an id argument and > zaps the chardev specified. > > chardev_add is more tricky as there are tons of arguments for the Oops. Ignore t

[Qemu-devel] [PATCH v2] chardev: add hotplug support.

2012-10-12 Thread Gerd Hoffmann
This patch adds chardev_add and chardev_del monitor commands. chardev_del is pretty straight forward, it just takes an id argument and zaps the chardev specified. chardev_add is more tricky as there are tons of arguments for the different backends. The hmp version limited to the most common use