[Qemu-devel] [PATCH] monitor: Remove hardcoded watchdog event names

2014-07-29 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- monitor.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/monitor.c b/monitor.c index 5bc70a6..7465775 100644 --- a/monitor.c +++ b/monitor.c @@ -4520,16 +4520,15 @@ void netdev_del_completion(ReadLineState *rs, int

Re: [Qemu-devel] examples or tutorial/docs for writing block drivers for qemu

2013-12-24 Thread Hani Benhabiles
Hi Vasiliy, On Mon, Dec 23, 2013 at 01:58:12PM +0400, Vasiliy Tolstov wrote: Hi all. I need to write some qemu block driver (like sheepdog or ceph). Where i can find some docs/tips/tutorials what functions i need to implement? Thank you. I haven't taken the time to look at it yet, but there

[Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided.

2014-01-07 Thread Hani Benhabiles
This would allow a user to be able to refer to the device when using commands like device_del. Signed-off-by: Hani Benhabiles kroo...@gmail.com --- qdev-monitor.c | 64 +- 1 file changed, 50 insertions(+), 14 deletions(-) diff --git a/qdev

Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided.

2014-01-08 Thread Hani Benhabiles
On Wed, Jan 08, 2014 at 08:36:06AM +0100, Markus Armbruster wrote: Hani Benhabiles kroo...@gmail.com writes: This would allow a user to be able to refer to the device when using commands like device_del. Signed-off-by: Hani Benhabiles kroo...@gmail.com No. Device IDs belong

Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided.

2014-01-09 Thread Hani Benhabiles
On Wed, Jan 08, 2014 at 06:34:01PM +0100, Paolo Bonzini wrote: Il 08/01/2014 18:17, Hani Benhabiles ha scritto: For this reason, the loop in assign_device_name() specifically check that the ID doesn't exist already and uses the next value if it does. How would something like: (qemu

[Qemu-devel] [PATCH] net: Use g_strdup_printf instead of snprintf.

2014-01-09 Thread Hani Benhabiles
assign_name() in net/net.c is using snprintf + g_strdup to get the same result as g_strdup_printf. Signed-off-by: Hani Benhabiles kroo...@gmail.com --- net/net.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/net.c b/net/net.c index 9db88cc..9363b35 100644 --- a/net

Re: [Qemu-devel] [PATCH 0/7] monitor: Completion support for various commands.

2014-03-27 Thread Hani Benhabiles
On Thu, Mar 27, 2014 at 04:26:15PM -0400, Luiz Capitulino wrote: On Sun, 9 Mar 2014 12:16:10 +0100 Hani Benhabiles kroo...@gmail.com wrote: This patch series adds a new callback to mon_cmd_t which will make adding completion support for more commands cleaner. It then adds full

Re: [Qemu-devel] [PATCH 4/7] monitor: Add cpu index argument completion.

2014-03-27 Thread Hani Benhabiles
On Thu, Mar 27, 2014 at 04:24:50PM -0400, Luiz Capitulino wrote: On Sun, 9 Mar 2014 12:16:14 +0100 Hani Benhabiles kroo...@gmail.com wrote: Signed-off-by: Hani Benhabiles h...@linux.com Honest question: is this one really worth it? Aren't we just auto-completing a single integer

Re: [Qemu-devel] [PATCH 1/7] monitor: Add command_completion callback to mon_cmd_t.

2014-03-27 Thread Hani Benhabiles
and object_del. Also, please, take the simplest conversion for the first patch, which introduces the callback. Ok, I will split them. Just felt that the number of patches was growing-up too fast. One more comment below. Signed-off-by: Hani Benhabiles h...@linux.com Suggested-by: Luiz Capitulino

[Qemu-devel] [PATCH v2 09/17] monitor: Add netdev_del id argument completion.

2014-03-30 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 1 + hmp.h | 1 + monitor.c | 26 ++ 3 files changed, 28 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index b009561..d252ffc 100644 --- a/hmp-commands.hx +++ b/hmp

[Qemu-devel] [PATCH v2 00/17] monitor: Completion support for various commands

2014-03-30 Thread Hani Benhabiles
first argument from Monitor to ReadLineState. * Added new commands completions (10/17 to 17/17) Hani Benhabiles (17): monitor: Fix drive_del id argument type completion. monitor: Add command_completion callback to mon_cmd_t. monitor: Add device_add and device_del completion. monitor: Add

[Qemu-devel] [PATCH v2 13/17] monitor: Add host_net_add device argument completion.

2014-03-30 Thread Hani Benhabiles
Also fix the parameters documentation. Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 3 ++- hmp.h | 1 + monitor.c | 14 ++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 8c674ba..9da5866

[Qemu-devel] [PATCH v2 07/17] monitor: Add set_link arguments completion.

2014-03-30 Thread Hani Benhabiles
Make it possible to query all net clients without specifying an ID when calling qemu_find_net_clients_except(). This also adds the add_completion_option() function which is to be used for other commands completions as well. Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 1

[Qemu-devel] [PATCH v2 08/17] monitor: Add netdev_add type argument completion.

2014-03-30 Thread Hani Benhabiles
Also update the command's documentation. Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 3 ++- hmp.h | 1 + monitor.c | 18 ++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index fbd303a

[Qemu-devel] [PATCH v2 04/17] monitor: Add chardev-remove id argument completion.

2014-03-30 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 1 + hmp.h | 1 + monitor.c | 23 +++ 3 files changed, 25 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 4c4d261..4f0f053 100644 --- a/hmp-commands.hx +++ b/hmp

[Qemu-devel] [PATCH v2 11/17] monitor: Add watchdog_action argument completion.

2014-03-30 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 1 + hmp.h | 2 ++ monitor.c | 14 ++ 3 files changed, 17 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 300be4e..669a845 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx

[Qemu-devel] [PATCH v2 15/17] monitor: Add host_net_remove arguments completion.

2014-03-30 Thread Hani Benhabiles
Relies on readline unique completion strings patch to make the added vlan/hub completion values unique, instead of using something like a hash table. Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 1 + hmp.h | 2 ++ monitor.c | 38

[Qemu-devel] [PATCH v2 05/17] monitor: Add chardev-add backend argument completion.

2014-03-30 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 1 + hmp.h | 1 + monitor.c | 23 +++ 3 files changed, 25 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 4f0f053..a411d4f 100644 --- a/hmp-commands.hx +++ b/hmp

[Qemu-devel] [PATCH v2 14/17] readline: Make completion strings always unique.

2014-03-30 Thread Hani Benhabiles
There is no need to clutter the user's choices with repeating the same value multiple times. Signed-off-by: Hani Benhabiles h...@linux.com --- util/readline.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/util/readline.c b/util/readline.c index 8441be4..6aeae6a 100644 --- a/util

[Qemu-devel] [PATCH v2 06/17] monitor: Add cpu index argument completion.

2014-03-30 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 1 + hmp.h | 1 + monitor.c | 24 3 files changed, 26 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index a411d4f..813c0fb 100644 --- a/hmp-commands.hx +++ b/hmp

[Qemu-devel] [PATCH v2 17/17] monitor: Add delvm and loadvm argument completion.

2014-03-30 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 2 ++ hmp.h | 2 ++ monitor.c | 48 3 files changed, 52 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 04aa059..b59d0e0 100644 --- a/hmp

[Qemu-devel] [PATCH v2 10/17] monitor: Add ringbuf_write and ringbuf_read argument completion.

2014-03-30 Thread Hani Benhabiles
Export chr_is_ringbuf() function. Also remove left-over function prototypes while at it. Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 2 ++ hmp.h | 2 ++ include/sysemu/char.h | 3 +-- monitor.c | 39

[Qemu-devel] [PATCH v2 16/17] monitor: Add mouse_set index argument completion.

2014-03-30 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 1 + hmp.h | 1 + monitor.c | 22 ++ 3 files changed, 24 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index b41a6d6..04aa059 100644 --- a/hmp-commands.hx +++ b/hmp

[Qemu-devel] [PATCH v2 01/17] monitor: Fix drive_del id argument type completion.

2014-03-30 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index f3fc514..6bf4797 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -176,7 +176,7 @@ ETEXI { .name

[Qemu-devel] [PATCH v2 12/17] monitor: Add migrate_set_capability completion.

2014-03-30 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 1 + hmp.h | 2 ++ monitor.c | 21 + 3 files changed, 24 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 669a845..8c674ba 100644 --- a/hmp-commands.hx +++ b/hmp

[Qemu-devel] [PATCH v2 02/17] monitor: Add command_completion callback to mon_cmd_t.

2014-03-30 Thread Hani Benhabiles
Convert object_add and object_del commands to use the new callback. Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 2 ++ hmp.h | 3 +++ monitor.c | 19 +-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/hmp-commands.hx b/hmp

[Qemu-devel] [PATCH v2 03/17] monitor: Add device_add and device_del completion.

2014-03-30 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 2 ++ hmp.h | 2 ++ monitor.c | 34 +- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 1b382b6..4c4d261 100644 --- a/hmp

[Qemu-devel] [PATCH] input: mouse_set should check input device type.

2014-03-30 Thread Hani Benhabiles
Otherwise, the index of an input device like a usb-kbd is silently accepted. (qemu) info mice Mouse #2: QEMU PS/2 Mouse * Mouse #3: QEMU HID Mouse (qemu) mouse_set 1 (qemu) info mice Mouse #2: QEMU PS/2 Mouse * Mouse #3: QEMU HID Mouse Signed-off-by: Hani Benhabiles h...@linux.com --- ui

[Qemu-devel] [PATCH v2] input: mouse_set should check input device type.

2014-03-31 Thread Hani Benhabiles
() with error_report() and adjust error message. Signed-off-by: Hani Benhabiles h...@linux.com --- ui/input.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ui/input.c b/ui/input.c index 2761911..6e6a924 100644 --- a/ui/input.c +++ b/ui/input.c @@ -342,15 +342,21

Re: [Qemu-devel] [PATCH] input: mouse_set should check input device type.

2014-03-31 Thread Hani Benhabiles
On Mon, Mar 31, 2014 at 02:45:49PM +0200, Markus Armbruster wrote: Gerd Hoffmann kra...@redhat.com writes: +if (!(s-handler-mask (INPUT_EVENT_MASK_REL | + INPUT_EVENT_MASK_ABS))) { +monitor_printf(mon, Input device '%s' is not a mouse,

[Qemu-devel] [PATCH] net: Report error when device / hub combo is not found.

2014-03-31 Thread Hani Benhabiles
Also convert nearby monitor_printf() call to error_report(). Signed-off-by: Hani Benhabiles h...@linux.com --- net/net.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/net.c b/net/net.c index e3ef1e4..d319f49 100644 --- a/net/net.c +++ b/net/net.c @@ -952,10 +952,12

Re: [Qemu-devel] [PATCH v2 00/17] monitor: Completion support for various commands

2014-04-13 Thread Hani Benhabiles
On Fri, Apr 11, 2014 at 01:50:57PM -0400, Luiz Capitulino wrote: On Sun, 30 Mar 2014 11:58:22 +0100 Hani Benhabiles kroo...@gmail.com wrote: This patch series adds a new callback to mon_cmd_t which will make adding completion support for more commands cleaner. It then adds full

[Qemu-devel] [PATCH 0/3] monitor: Improve command completion

2014-04-13 Thread Hani Benhabiles
This patch series adds a new callback to mon_cmd_t which will make adding completion support for more commands cleaner. It moves some existing commands completions to using the new callback and also fixes the completion for device_add and drive_del commands. Hani Benhabiles (3): monitor: Fix

[Qemu-devel] [PATCH 2/3] monitor: Add command_completion callback to mon_cmd_t.

2014-04-13 Thread Hani Benhabiles
Convert object_add and object_del commands to use the new callback. Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 2 ++ hmp.h | 3 +++ monitor.c | 19 +-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/hmp-commands.hx b/hmp

[Qemu-devel] [PATCH 1/3] monitor: Fix drive_del id argument type completion.

2014-04-13 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index f3fc514..6bf4797 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -176,7 +176,7 @@ ETEXI { .name

[Qemu-devel] [PATCH 3/3] monitor: Add device_add and device_del completion.

2014-04-13 Thread Hani Benhabiles
Also fix device_add completion including non-hotpluggable devices. Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 2 ++ hmp.h | 2 ++ monitor.c | 38 -- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/hmp

[Qemu-devel] [PATCH] watchdog: Export watchdog actions list.

2014-06-15 Thread Hani Benhabiles
Also, use it instead of using hard-coded values. Signed-off-by: Hani Benhabiles h...@linux.com --- Should have been part of the last monitor completion series, but better late then never. :) hw/watchdog/watchdog.c| 35 +++ include/sysemu/watchdog.h | 6

Re: [Qemu-devel] [PATCH] watchdog: Export watchdog actions list.

2014-06-15 Thread Hani Benhabiles
On Sun, Jun 15, 2014 at 03:57:46PM +0200, Paolo Bonzini wrote: Il 15/06/2014 12:03, Hani Benhabiles ha scritto: Also, use it instead of using hard-coded values. Signed-off-by: Hani Benhabiles h...@linux.com --- Should have been part of the last monitor completion series, but better late

Re: [Qemu-devel] [PATCH] usb: Fix usb-bt-dongle segfault.

2014-06-15 Thread Hani Benhabiles
On Wed, Jun 11, 2014 at 08:58:08PM +0200, Paolo Bonzini wrote: Il 11/06/2014 19:25, Hani Benhabiles ha scritto: Due to an incomplete initialization, adding a usb-bt-dongle device through HMP or QMP will cause a segmentation fault. Signed-off-by: Hani Benhabiles h...@linux.com

Re: [Qemu-devel] [PATCH] usb: Fix usb-bt-dongle segfault.

2014-06-17 Thread Hani Benhabiles
On Mon, Jun 16, 2014 at 11:00:42AM +0200, Paolo Bonzini wrote: Il 15/06/2014 23:37, Hani Benhabiles ha scritto: diff --git a/hw/usb/dev-bluetooth.c b/hw/usb/dev-bluetooth.c index a9661d2..6d02343 100644 --- a/hw/usb/dev-bluetooth.c +++ b/hw/usb/dev-bluetooth.c @@ -506,6 +506,12 @@ static int

[Qemu-devel] [PATCHv2] usb: Fix usb-bt-dongle initialization.

2014-06-17 Thread Hani Benhabiles
Due to an incomplete initialization, adding a usb-bt-dongle device through HMP or QMP will cause a segmentation fault. Signed-off-by: Hani Benhabiles h...@linux.com Suggested-by: Paolo Bonzini pbonz...@redhat.com --- Compared to v1: * Remove duplicate code from usb_bt_init() and inline

Re: [Qemu-devel] [PULL 0/5] NBD changes for 2014-06-27

2014-06-29 Thread Hani Benhabiles
On Sun, Jun 29, 2014 at 12:45:27PM +0100, Peter Maydell wrote: On 27 June 2014 15:11, Paolo Bonzini pbonz...@redhat.com wrote: The following changes since commit d4cba13bdf251baeedb36b87c1e9f6766773e380: tcg/ppc: Fix failure in tcg_out_mem_long (2014-06-27 13:23:41 +0100) are

Re: [Qemu-devel] [PATCH] monitor: Add info qom-tree subcommand.

2014-05-11 Thread Hani Benhabiles
On Wed, May 07, 2014 at 01:01:12PM +0200, Paolo Bonzini wrote: Il 05/05/2014 20:33, Luiz Capitulino ha scritto: +data = object_property_get_qobject(obj, info-name, NULL); +if (!data) { +list = list-next; +continue; You could use

Re: [Qemu-devel] [PATCH] monitor: Add info qom-tree subcommand.

2014-05-11 Thread Hani Benhabiles
On Wed, May 07, 2014 at 05:39:36PM +0200, Andreas Färber wrote: Hi Hani, Am 27.04.2014 12:29, schrieb Hani Benhabiles: Signed-off-by: Hani Benhabiles h...@linux.com --- Not sure whether the qobject stringifying functions could fit or be of some use elsewhere. Thus, I kept them

Re: [Qemu-devel] [PATCH qom-next 1/4] qom: Implement info qom-composition HMP command

2014-05-11 Thread Hani Benhabiles
) { Error *local_err = NULL; Reviewed-by: Hani Benhabiles h...@linux.com

Re: [Qemu-devel] [PATCH qom-next 2/4] qom: Implement qom-list HMP command

2014-05-11 Thread Hani Benhabiles
On Thu, May 08, 2014 at 04:21:15PM +0200, Andreas Färber wrote: Implement it as a wrapper for QMP qom-list, but mimic the behavior of scripts/qmp/qom-list in making the path argument optional and listing the root if absent, to hint users what kind of path to pass. Signed-off-by: Andreas

Re: [Qemu-devel] [PATCH qom-next 3/4] qom: Implement qom-get HMP command

2014-05-11 Thread Hani Benhabiles
On Thu, May 08, 2014 at 04:21:16PM +0200, Andreas Färber wrote: Reimplement it based on qmp_qom_get() to avoid converting QObjects back to strings. Inspired-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Andreas Färber afaer...@suse.de --- hmp-commands.hx | 13 + hmp.c

Re: [Qemu-devel] [PATCH qom-next 4/4] qom: Implement qom-set HMP command

2014-05-11 Thread Hani Benhabiles
On Thu, May 08, 2014 at 04:21:17PM +0200, Andreas Färber wrote: Re-implemented based on qmp_qom_set() to facilitate argument parsing. Signed-off-by: Andreas Färber afaer...@suse.de --- hmp-commands.hx | 13 + hmp.c | 18 ++ hmp.h | 1 + 3

[Qemu-devel] [PATCH 2/2] nbd: Miscellaneous typo fixes.

2014-05-12 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- nbd.c | 2 +- qemu-nbd.c| 2 +- qemu-nbd.texi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nbd.c b/nbd.c index e5084b6..e0d032c 100644 --- a/nbd.c +++ b/nbd.c @@ -306,7 +306,7 @@ static int nbd_send_negotiate

[Qemu-devel] [PATCH 1/2] nbd: Close socket on negotiation failure.

2014-05-12 Thread Hani Benhabiles
Otherwise, the nbd client may hang waiting for the server response. Signed-off-by: Hani Benhabiles h...@linux.com --- Quick method to trigger such behaviour: (qemu) nbd_server_start localhost:10809 (qemu) nbd_server_add sd0 $ nbd-client localhost 10809 -name /dev/nbd0 Negotiation

Re: [Qemu-devel] [PATCH 0/6] Miscellaneous command completion patches

2014-05-15 Thread Hani Benhabiles
On Wed, May 07, 2014 at 11:41:26PM +0100, Hani Benhabiles wrote: Compared to v1: * Dropped patch 02/07 for help completion conversion. * Nothing else changed. 04,05 and 06 are R-b by Stefan. Hani Benhabiles (6): monitor: Convert sendkey to use command_completion. monitor: Add chardev

Re: [Qemu-devel] [PATCH 0/6] Miscellaneous command completion patches

2014-05-15 Thread Hani Benhabiles
On Thu, May 15, 2014 at 04:10:11PM -0400, Luiz Capitulino wrote: On Thu, 15 May 2014 20:42:03 +0100 Hani Benhabiles kroo...@gmail.com wrote: On Wed, May 07, 2014 at 11:41:26PM +0100, Hani Benhabiles wrote: Compared to v1: * Dropped patch 02/07 for help completion conversion

[Qemu-devel] [PATCH 1/2] nbd: Don't export a block device with no medium.

2014-05-18 Thread Hani Benhabiles
-protected, mounting read-only mount: /dev/nbd0: can't read superblock After the patch: (qemu) nbd_server_add ide0-hd0 (qemu) nbd_server_add floppy0 Device 'floppy0' has no medium Signed-off-by: Hani Benhabiles h...@linux.com --- blockdev-nbd.c | 4 1 file changed, 4 insertions(+) diff --git

[Qemu-devel] [PATCH 2/2] nbd: Don't validate from and len in NBD_CMD_DISC.

2014-05-18 Thread Hani Benhabiles
, Len: 0, Size: 20971520, Offset: 0 nbd.c:nbd_trip():L1032: requested operation past EOF--bad client? nbd.c:nbd_receive_request():L638: read failed Signed-off-by: Hani Benhabiles h...@linux.com --- nbd.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nbd.c b/nbd.c index

Re: [Qemu-devel] [PATCH 2/2] nbd: Don't validate from and len in NBD_CMD_DISC.

2014-05-19 Thread Hani Benhabiles
On Mon, May 19, 2014 at 01:05:12PM +0200, Paolo Bonzini wrote: Il 18/05/2014 12:50, Hani Benhabiles ha scritto: These values aren't used in this case. Currently, the from field in the request sent by the nbd kernel module leading to a false error message when ending the connection

[Qemu-devel] [PATCH 1/7] monitor: Add ringbuf_write and ringbuf_read argument completion.

2014-05-19 Thread Hani Benhabiles
Export chr_is_ringbuf() function. Also remove left-over function prototypes while at it. Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 2 ++ hmp.h | 2 ++ include/sysemu/char.h | 3 +-- monitor.c | 39

[Qemu-devel] [PATCH 2/7] monitor: Add watchdog_action argument completion.

2014-05-19 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 1 + hmp.h | 2 ++ monitor.c | 14 ++ 3 files changed, 17 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index dcec5ef..45e1763 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx

[Qemu-devel] [PATCH 3/7] monitor: Add migrate_set_capability completion.

2014-05-19 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 1 + hmp.h | 2 ++ monitor.c | 21 + 3 files changed, 24 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 45e1763..919af6e 100644 --- a/hmp-commands.hx +++ b/hmp

[Qemu-devel] monitor: Command completion for various commands

2014-05-19 Thread Hani Benhabiles
A set of patches adding completion support for various hmp commands. Following other series that were merged earlier. Hani Benhabiles (7): monitor: Add ringbuf_write and ringbuf_read argument completion. monitor: Add watchdog_action argument completion. monitor: Add migrate_set_capability

[Qemu-devel] [PATCH 5/7] readline: Make completion strings always unique.

2014-05-19 Thread Hani Benhabiles
There is no need to clutter the user's choices with repeating the same value multiple times. Signed-off-by: Hani Benhabiles h...@linux.com --- util/readline.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/util/readline.c b/util/readline.c index 8baec55..7214e84 100644 --- a/util

[Qemu-devel] [PATCH 4/7] monitor: Add host_net_add device argument completion.

2014-05-19 Thread Hani Benhabiles
Also fix the parameters documentation. Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 3 ++- hmp.h | 1 + monitor.c | 14 ++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 919af6e..6aaec1b

Re: [Qemu-devel] monitor: Command completion for various commands

2014-05-19 Thread Hani Benhabiles
On Tue, May 20, 2014 at 12:01:01AM +0100, Hani Benhabiles wrote: A set of patches adding completion support for various hmp commands. Following other series that were merged earlier. Resent the complete series. Please ignore this incomplete one. Sorry for the flood. Hani Benhabiles (7

[Qemu-devel] [PATCH 3/7] monitor: Add migrate_set_capability completion.

2014-05-19 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 1 + hmp.h | 2 ++ monitor.c | 21 + 3 files changed, 24 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 45e1763..919af6e 100644 --- a/hmp-commands.hx +++ b/hmp

[Qemu-devel] [PATCH 7/7] monitor: Add delvm and loadvm argument completion.

2014-05-19 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 2 ++ hmp.h | 2 ++ monitor.c | 48 3 files changed, 52 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 935f744..d68a00b 100644 --- a/hmp

[Qemu-devel] [PATCH 1/7] monitor: Add ringbuf_write and ringbuf_read argument completion.

2014-05-19 Thread Hani Benhabiles
Export chr_is_ringbuf() function. Also remove left-over function prototypes while at it. Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 2 ++ hmp.h | 2 ++ include/sysemu/char.h | 3 +-- monitor.c | 39

[Qemu-devel] [PATCH 2/7] monitor: Add watchdog_action argument completion.

2014-05-19 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 1 + hmp.h | 2 ++ monitor.c | 14 ++ 3 files changed, 17 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index dcec5ef..45e1763 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx

[Qemu-devel] monitor: Command completion for various commands

2014-05-19 Thread Hani Benhabiles
A set of patches adding completion support for various hmp commands. Following other series that were merged earlier. Hani Benhabiles (7): monitor: Add ringbuf_write and ringbuf_read argument completion. monitor: Add watchdog_action argument completion. monitor: Add migrate_set_capability

[Qemu-devel] [PATCH 6/7] monitor: Add host_net_remove arguments completion.

2014-05-19 Thread Hani Benhabiles
Relies on readline unique completion strings patch to make the added vlan/hub completion values unique, instead of using something like a hash table. Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 1 + hmp.h | 2 ++ monitor.c | 38

[Qemu-devel] [PATCH 1/2] nbd: Handle fixed new-style clients.

2014-05-25 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- include/block/nbd.h | 6 ++ nbd.c | 12 +++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/include/block/nbd.h b/include/block/nbd.h index 79502a0..95d52ab 100644 --- a/include/block/nbd.h +++ b/include

[Qemu-devel] [PATCH 2/2] nbd: Handle NBD_OPT_LIST option.

2014-05-25 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- include/block/nbd.h | 4 +++ nbd.c | 97 +++-- 2 files changed, 99 insertions(+), 2 deletions(-) diff --git a/include/block/nbd.h b/include/block/nbd.h index 95d52ab..23e9a84 100644

[Qemu-devel] nbd: Add exports listing support

2014-05-25 Thread Hani Benhabiles
Before the patches: $ nbd-client -l localhost Negotiation: .. E: Server does not support listing exports After the patches: $ nbd-client -l localhost Negotiation: .. ide0-hd0 ide1-cd0 Hani Benhabiles (2): nbd: Handle fixed new-style clients. nbd: Handle NBD_OPT_LIST option. include/block

Re: [Qemu-devel] [PATCH 4/7] monitor: Add host_net_add device argument completion.

2014-05-25 Thread Hani Benhabiles
On Fri, May 23, 2014 at 02:05:03PM +0200, Stefan Hajnoczi wrote: On Tue, May 20, 2014 at 12:03:17AM +0100, Hani Benhabiles wrote: diff --git a/hmp-commands.hx b/hmp-commands.hx index 919af6e..6aaec1b 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1209,9 +1209,10 @@ ETEXI

[Qemu-devel] [PATCHv2 8/8] monitor: Add delvm and loadvm argument completion.

2014-05-27 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 2 ++ hmp.h | 2 ++ monitor.c | 48 3 files changed, 52 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index f99da0e..5f1a677 100644 --- a/hmp

[Qemu-devel] [PATCHv2 6/8] readline: Make completion strings always unique.

2014-05-27 Thread Hani Benhabiles
There is no need to clutter the user's choices with repeating the same value multiple times. Signed-off-by: Hani Benhabiles h...@linux.com --- util/readline.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/util/readline.c b/util/readline.c index 8baec55..7214e84 100644 --- a/util

[Qemu-devel] [PATCHv2 3/8] monitor: Add migrate_set_capability completion.

2014-05-27 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 1 + hmp.h | 2 ++ monitor.c | 21 + 3 files changed, 24 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 45e1763..919af6e 100644 --- a/hmp-commands.hx +++ b/hmp

[Qemu-devel] [PATCHv2 0/8] monitor: Command completion for various commands

2014-05-27 Thread Hani Benhabiles
A set of patches adding completion support for various hmp commands. Following other series that were merged earlier. Compared to v1: * patch 04/08: New. * patch 05/08: Use exported list of host network devices. Hani Benhabiles (8): monitor: Add ringbuf_write and ringbuf_read argument

[Qemu-devel] [PATCHv2 4/8] net: Export valid host network devices list

2014-05-27 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- include/net/net.h | 1 + net/net.c | 34 -- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/include/net/net.h b/include/net/net.h index 8166345..8b189da 100644 --- a/include/net/net.h +++ b

[Qemu-devel] [PATCHv2 5/8] monitor: Add host_net_add device argument completion.

2014-05-27 Thread Hani Benhabiles
Also fix the parameters documentation. Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 3 ++- hmp.h | 1 + monitor.c | 16 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 919af6e

[Qemu-devel] [PATCHv2 7/8] monitor: Add host_net_remove arguments completion.

2014-05-27 Thread Hani Benhabiles
Relies on readline unique completion strings patch to make the added vlan/hub completion values unique, instead of using something like a hash table. Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 1 + hmp.h | 2 ++ monitor.c | 38

[Qemu-devel] [PATCHv2 2/8] monitor: Add watchdog_action argument completion.

2014-05-27 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 1 + hmp.h | 2 ++ monitor.c | 14 ++ 3 files changed, 17 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index dcec5ef..45e1763 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx

[Qemu-devel] [PATCHv2 1/8] monitor: Add ringbuf_write and ringbuf_read argument completion.

2014-05-27 Thread Hani Benhabiles
Export chr_is_ringbuf() function. Also remove left-over function prototypes while at it. Signed-off-by: Hani Benhabiles h...@linux.com --- hmp-commands.hx | 2 ++ hmp.h | 2 ++ include/sysemu/char.h | 3 +-- monitor.c | 39

Re: [Qemu-devel] [PATCH 1/2] nbd: Handle fixed new-style clients.

2014-05-27 Thread Hani Benhabiles
On Tue, May 27, 2014 at 04:46:46PM +0200, Paolo Bonzini wrote: Il 25/05/2014 11:50, Hani Benhabiles ha scritto: @@ -236,9 +236,10 @@ static int nbd_receive_options(NBDClient *client) LOG(read failed); goto fail; } -TRACE(Checking reserved); -if (tmp != 0

[Qemu-devel] [PATCH] object: Report type in error when not user creatable.

2014-02-18 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- qmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qmp.c b/qmp.c index d0d98e7..f556a04 100644 --- a/qmp.c +++ b/qmp.c @@ -556,8 +556,8 @@ void object_add(const char *type, const char *id, const QDict *qdict

[Qemu-devel] [PATCH] balloon: Fix device name in error message.

2014-02-23 Thread Hani Benhabiles
Also fix trailing whitespace. Signed-off-by: Hani Benhabiles h...@linux.com --- balloon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/balloon.c b/balloon.c index e321f2c..b66710a 100644 --- a/balloon.c +++ b/balloon.c @@ -125,8 +125,8 @@ void qmp_balloon(int64_t value

Re: [Qemu-devel] [PATCH] balloon: Fix device name in error message.

2014-02-24 Thread Hani Benhabiles
On Mon, Feb 24, 2014 at 10:04:05AM +0100, Markus Armbruster wrote: I agree the error message is bad, but I'm afraid your patch makes it worse :) qemu_balloon() returns zero when balloon_event_fn has not been set with qemu_add_balloon_handler(). Right now, the only device that calls

[Qemu-devel] [PATCH] qerror: Improve QERR_DEVICE_NOT_ACTIVE message

2014-02-24 Thread Hani Benhabiles
The error message as currently used is confusing as there are no balloon or spice devices. (qemu) balloon 1024 balloon: Device 'balloon' has not been activated With this patch: (qemu) balloon 1024 balloon: No balloon device has been activated Signed-off-by: Hani Benhabiles h...@linux.com

Re: [Qemu-devel] [PATCH] qerror: Improve QERR_DEVICE_NOT_ACTIVE message

2014-02-25 Thread Hani Benhabiles
On Tue, Feb 25, 2014 at 09:41:02AM +0100, Markus Armbruster wrote: Hani Benhabiles kroo...@gmail.com writes: The error message as currently used is confusing as there are no balloon or spice devices. (qemu) balloon 1024 balloon: Device 'balloon' has not been activated

[Qemu-devel] [PATCH] monitor: Remove left-over code in do_info_profile.

2014-02-26 Thread Hani Benhabiles
This is a left-over from 4a1418e. Signed-off-by: Hani Benhabiles h...@linux.com --- monitor.c | 4 1 file changed, 4 deletions(-) diff --git a/monitor.c b/monitor.c index aebcbd8..3863d83 100644 --- a/monitor.c +++ b/monitor.c @@ -2021,10 +2021,6 @@ int64_t dev_time; static void

[Qemu-devel] [PATCH] monitor: Add device_add type argument completion.

2014-01-24 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles kroo...@gmail.com --- monitor.c | 25 + 1 file changed, 25 insertions(+) diff --git a/monitor.c b/monitor.c index 845f608..cf91544 100644 --- a/monitor.c +++ b/monitor.c @@ -4254,6 +4254,26 @@ static const char *next_arg_type(const char

[Qemu-devel] [PATCH] monitor: Add device_del argument completion.

2014-01-27 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles kroo...@gmail.com --- monitor.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/monitor.c b/monitor.c index 80456fb..a7a589e 100644 --- a/monitor.c +++ b/monitor.c @@ -4254,6 +4254,25 @@ static const char *next_arg_type(const char

[Qemu-devel] [PATCH 1/4] monitor: Add device_del id argument completion.

2014-02-06 Thread Hani Benhabiles
--- monitor.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/monitor.c b/monitor.c index b1ea262..f8c4cae 100644 --- a/monitor.c +++ b/monitor.c @@ -4254,6 +4254,25 @@ static const char *next_arg_type(const char *typestr) return (p != NULL ? ++p : typestr); }

[Qemu-devel] [PATCH 0/4] monitor: Add argument completion for multiple commands.

2014-02-06 Thread Hani Benhabiles
This patch series add argument completion to multiple human monitor console commands. For device_add and object_add, only the 1st argument is completed. Hani Benhabiles (4): monitor: Add device_del id argument completion. monitor: Add device_add device argument completion. monitor: Add

[Qemu-devel] [PATCH 3/4] monitor: Add object_del id argument completion.

2014-02-06 Thread Hani Benhabiles
--- monitor.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/monitor.c b/monitor.c index 65410cb..4a2c1ae 100644 --- a/monitor.c +++ b/monitor.c @@ -4294,6 +4294,27 @@ static void device_del_completion(ReadLineState *rs, BusState *bus, } } +static void

[Qemu-devel] [PATCH 2/4] monitor: Add device_add device argument completion.

2014-02-06 Thread Hani Benhabiles
--- monitor.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/monitor.c b/monitor.c index f8c4cae..65410cb 100644 --- a/monitor.c +++ b/monitor.c @@ -4254,6 +4254,27 @@ static const char *next_arg_type(const char *typestr) return (p != NULL ? ++p : typestr);

[Qemu-devel] [PATCH 4/4] monitor: Add object_add class argument completion.

2014-02-06 Thread Hani Benhabiles
--- monitor.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/monitor.c b/monitor.c index 4a2c1ae..397e1fe 100644 --- a/monitor.c +++ b/monitor.c @@ -56,6 +56,7 @@ #include qapi/qmp/qjson.h #include qapi/qmp/json-streamer.h #include qapi/qmp/json-parser.h +#include

Re: [Qemu-devel] [PATCH] monitor: Add device_add type argument completion.

2014-02-10 Thread Hani Benhabiles
Hi Luiz, Thanks for taking a look at it. On Mon, Feb 10, 2014 at 02:49:13PM -0500, Luiz Capitulino wrote: On Fri, 24 Jan 2014 23:27:55 +0100 Hani Benhabiles kroo...@gmail.com wrote: Signed-off-by: Hani Benhabiles kroo...@gmail.com --- monitor.c | 25 + 1 file

Re: [Qemu-devel] [PATCH 0/4] monitor: Add argument completion for multiple commands.

2014-02-11 Thread Hani Benhabiles
On Tue, Feb 11, 2014 at 01:39:13PM -0500, Luiz Capitulino wrote: On Thu, 6 Feb 2014 23:30:09 +0100 Hani Benhabiles kroo...@gmail.com wrote: This patch series add argument completion to multiple human monitor console commands. For device_add and object_add, only the 1st argument

Re: [Qemu-devel] [PATCH 4/4] monitor: Add object_add class argument completion.

2014-02-11 Thread Hani Benhabiles
On Tue, Feb 11, 2014 at 01:38:32PM -0500, Luiz Capitulino wrote: On Thu, 6 Feb 2014 23:30:13 +0100 Hani Benhabiles kroo...@gmail.com wrote: --- monitor.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/monitor.c b/monitor.c index 4a2c1ae..397e1fe

[Qemu-devel] [PATCH] qmp: Remove unused variable.

2014-04-22 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles h...@linux.com --- qmp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qmp.c b/qmp.c index 87a28f7..44a6e17 100644 --- a/qmp.c +++ b/qmp.c @@ -194,11 +194,10 @@ void qmp_system_wakeup(Error **errp) ObjectPropertyInfoList *qmp_qom_list(const

Re: [Qemu-devel] [PATCH 0/3] monitor: Improve command completion

2014-04-25 Thread Hani Benhabiles
On Fri, Apr 25, 2014 at 09:48:33AM -0400, Luiz Capitulino wrote: On Sun, 13 Apr 2014 16:25:04 +0100 Hani Benhabiles kroo...@gmail.com wrote: This patch series adds a new callback to mon_cmd_t which will make adding completion support for more commands cleaner. It moves some existing

  1   2   >