[Qemu-devel] [PATCH 1/2] qdev: qdev_unplug(): use error_set()

2012-04-09 Thread Luiz Capitulino
It currently uses qerror_report(), but next commit will convert the drive_del command to the QAPI and this requires using error_set(). One particularity of qerror_report() is that it knows when it's running on monitor context or command-line context and prints the error message accordingly. error_

[Qemu-devel] [PATCH 1/2] qdev: qdev_unplug(): use error_set()

2012-03-29 Thread Luiz Capitulino
It currently uses qerror_report(), but next commit will convert the drive_del command to the QAPI and this requires using error_set(). One particularity of qerror_report() is that it knows when it's running on monitor context or command-line context and prints the error message accordingly. error_

Re: [Qemu-devel] [PATCH 1/2] qdev: qdev_unplug(): Use error_set()

2012-03-29 Thread Stefan Hajnoczi
On Thu, Mar 29, 2012 at 2:15 PM, Luiz Capitulino wrote: > On Thu, 29 Mar 2012 08:00:15 +0100 > Stefan Hajnoczi wrote: > >> On Wed, Mar 28, 2012 at 05:50:53PM -0300, Luiz Capitulino wrote: >> > @@ -268,7 +270,14 @@ static int pci_device_hot_remove(Monitor *mon, const >> > char *pci_addr) >> >    

Re: [Qemu-devel] [PATCH 1/2] qdev: qdev_unplug(): Use error_set()

2012-03-29 Thread Luiz Capitulino
On Thu, 29 Mar 2012 08:00:15 +0100 Stefan Hajnoczi wrote: > On Wed, Mar 28, 2012 at 05:50:53PM -0300, Luiz Capitulino wrote: > > @@ -268,7 +270,14 @@ static int pci_device_hot_remove(Monitor *mon, const > > char *pci_addr) > > monitor_printf(mon, "slot %d empty\n", slot); > > r

Re: [Qemu-devel] [PATCH 1/2] qdev: qdev_unplug(): Use error_set()

2012-03-29 Thread Stefan Hajnoczi
On Wed, Mar 28, 2012 at 05:50:53PM -0300, Luiz Capitulino wrote: > @@ -268,7 +270,14 @@ static int pci_device_hot_remove(Monitor *mon, const > char *pci_addr) > monitor_printf(mon, "slot %d empty\n", slot); > return -1; > } > -return qdev_unplug(&d->qdev); > + > +ret

[Qemu-devel] [PATCH 1/2] qdev: qdev_unplug(): Use error_set()

2012-03-28 Thread Luiz Capitulino
It currently uses qerror_report(), but next commits will convert the drive_del command to the QAPI and this requires using error_set(). One particularity of qerror_report() is that it knows when it's running on monitor context or command-line context and prints the error message accordingly. error