All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue
@ 2010-04-05 20:33 Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 01/21] qdev: Convert qdev_unplug() to QError Luiz Capitulino
                   ` (21 more replies)
  0 siblings, 22 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: qemu-devel

 Hi Anthony,

 I was going to nag you to apply patches from the list, but as I'm maintaining
a QMP/Monitor queue to test them, I thought it would be a good idea to nag you
in the form of a git pull :)

 All the patches in there have been posted to the list already and, to make it
convenient to review, I'm sending them again in this series (not sure if it's
a good idea, though).

 The changes (since 116348def2bb446d972bdc2f44bd77ff631f85de) are available in
the following repository:

    git://repo.or.cz/qemu/qmp-unstable.git for-anthony

Kevin Wolf (1):
      virtio-blk: Fix use after free in error case

Luiz Capitulino (2):
      QMP: Improve RTC_CHANGE event description
      Monitor: Convert do_screen_dump() to QObject

Markus Armbruster (17):
      qdev: Convert qdev_unplug() to QError
      monitor: convert do_device_del() to QObject, QError
      error: Put error definitions back in alphabetical order
      error: New QERR_DUPLICATE_ID
      error: Convert qemu_opts_create() to QError
      error: New QERR_INVALID_PARAMETER_VALUE
      error: Convert qemu_opts_set() to QError
      error: Drop extra messages after qemu_opts_set() and qemu_opts_parse()
      error: Use QERR_INVALID_PARAMETER_VALUE instead of QERR_INVALID_PARAMETER
      error: Convert qemu_opts_validate() to QError
      error: Convert net_client_init() to QError
      error: New QERR_DEVICE_IN_USE
      monitor: New commands netdev_add, netdev_del
      monitor: Rename argument type 'b' to 'f'
      monitor: New argument type 'b'
      monitor: Use argument type 'b' for set_link
      monitor: Convert do_set_link() to QObject, QError

Ryan Harper (1):
      Add qerror message if the 'change' target filename can't be opened

 QMP/qmp-events.txt |    2 +-
 hw/pci-hotplug.c   |    2 -
 hw/qdev.c          |   13 +++---
 hw/qdev.h          |    2 +-
 hw/virtio-blk.c    |    6 +-
 monitor.c          |   49 +++++++++++++++++++---
 net.c              |  112 ++++++++++++++++++++++++++++++++++++---------------
 net.h              |    4 +-
 qemu-config.c      |    1 -
 qemu-monitor.hx    |   49 +++++++++++++++++++----
 qemu-option.c      |   24 +++++------
 qerror.c           |   20 ++++++++-
 qerror.h           |   17 ++++++-
 vl.c               |    5 --
 14 files changed, 218 insertions(+), 88 deletions(-)

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 01/21] qdev: Convert qdev_unplug() to QError
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 02/21] monitor: convert do_device_del() to QObject, QError Luiz Capitulino
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Luiz Capitulino, qemu-devel, Markus Armbruster

From: Markus Armbruster <armbru@redhat.com>

Note: our device unplug methods don't need conversion work, because
they can't currently fail.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 hw/qdev.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/hw/qdev.c b/hw/qdev.c
index 17a46a7..0612dc0 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -287,8 +287,7 @@ int qdev_init(DeviceState *dev)
 int qdev_unplug(DeviceState *dev)
 {
     if (!dev->parent_bus->allow_hotplug) {
-        error_report("Bus %s does not support hotplugging",
-                     dev->parent_bus->name);
+        qerror_report(QERR_BUS_NO_HOTPLUG, dev->parent_bus->name);
         return -1;
     }
     assert(dev->info->unplug != NULL);
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 02/21] monitor: convert do_device_del() to QObject, QError
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 01/21] qdev: Convert qdev_unplug() to QError Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 03/21] Add qerror message if the 'change' target filename can't be opened Luiz Capitulino
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Luiz Capitulino, qemu-devel, Markus Armbruster

From: Markus Armbruster <armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 hw/qdev.c       |    8 ++++----
 hw/qdev.h       |    2 +-
 qemu-monitor.hx |    3 ++-
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/hw/qdev.c b/hw/qdev.c
index 0612dc0..5ca126b 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -799,15 +799,15 @@ int do_device_add(Monitor *mon, const QDict *qdict, QObject **ret_data)
     return 0;
 }
 
-void do_device_del(Monitor *mon, const QDict *qdict)
+int do_device_del(Monitor *mon, const QDict *qdict, QObject **ret_data)
 {
     const char *id = qdict_get_str(qdict, "id");
     DeviceState *dev;
 
     dev = qdev_find_recursive(main_system_bus, id);
     if (NULL == dev) {
-        error_report("Device '%s' not found", id);
-        return;
+        qerror_report(QERR_DEVICE_NOT_FOUND, id);
+        return -1;
     }
-    qdev_unplug(dev);
+    return qdev_unplug(dev);
 }
diff --git a/hw/qdev.h b/hw/qdev.h
index 9475705..40373c8 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -176,7 +176,7 @@ void qbus_free(BusState *bus);
 void do_info_qtree(Monitor *mon);
 void do_info_qdm(Monitor *mon);
 int do_device_add(Monitor *mon, const QDict *qdict, QObject **ret_data);
-void do_device_del(Monitor *mon, const QDict *qdict);
+int do_device_del(Monitor *mon, const QDict *qdict, QObject **ret_data);
 
 /*** qdev-properties.c ***/
 
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 5308f36..d290b4b 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -589,7 +589,8 @@ ETEXI
         .args_type  = "id:s",
         .params     = "device",
         .help       = "remove device",
-        .mhandler.cmd = do_device_del,
+        .user_print = monitor_user_noop,
+        .mhandler.cmd_new = do_device_del,
     },
 
 STEXI
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 03/21] Add qerror message if the 'change' target filename can't be opened
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 01/21] qdev: Convert qdev_unplug() to QError Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 02/21] monitor: convert do_device_del() to QObject, QError Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 04/21] error: Put error definitions back in alphabetical order Luiz Capitulino
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Ryan Harper, qemu-devel, Luiz Capitulino

From: Ryan Harper <ryanh@us.ibm.com>

Currently when using the change command to switch the file in the cd drive
the command doesn't complain if the file doesn't exit or can't be opened
and the drive keeps the existing image.  This patch adds a qerror_report
call to print a message out indicating the failure.  This error message
can be used to catch failures.

Current behavior:

QEMU 0.12.50 monitor - type 'help' for more information
(qemu) info block
ide0-hd0: type=hd removable=0 file=/dev/null ro=0 drv=host_device encrypted=0
ide1-cd0: type=cdrom removable=1 locked=0 [not inserted]
floppy0: type=floppy removable=1 locked=0 [not inserted]
sd0: type=floppy removable=1 locked=0 [not inserted]
(qemu) change ide1-cd0 /home/rharper/work/isos/Fedora-9-i386-DVD.iso
(qemu) info block
ide0-hd0: type=hd removable=0 file=/dev/null ro=0 drv=host_device encrypted=0
ide1-cd0: type=cdrom removable=1 locked=0
file=/home/rharper/work/isos/Fedora-9-i386-DVD.iso ro=0 drv=raw encrypted=0
floppy0: type=floppy removable=1 locked=0 [not inserted]
sd0: type=floppy removable=1 locked=0 [not inserted]
(qemu) change ide1-cd0 /tmp/non_existent_file.iso
(qemu) info block
ide0-hd0: type=hd removable=0 file=/dev/null ro=0 drv=host_device encrypted=0
ide1-cd0: type=cdrom removable=1 locked=0 [not inserted]
floppy0: type=floppy removable=1 locked=0 [not inserted]
sd0: type=floppy removable=1 locked=0 [not inserted]
(qemu)

With patch:
QEMU 0.12.50 monitor - type 'help' for more information
(qemu) change ide1-cd0 /tmp/non_existent_file.iso
Could not open '/tmp/non_existent_file.iso'
(qemu)

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 monitor.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/monitor.c b/monitor.c
index 822dc27..89952e8 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1097,6 +1097,7 @@ static int do_change_block(Monitor *mon, const char *device,
         return -1;
     }
     if (bdrv_open2(bs, filename, BDRV_O_RDWR, drv) < 0) {
+        qerror_report(QERR_OPEN_FILE_FAILED, filename);
         return -1;
     }
     return monitor_read_bdrv_key_start(mon, bs, NULL, NULL);
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 04/21] error: Put error definitions back in alphabetical order
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (2 preceding siblings ...)
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 03/21] Add qerror message if the 'change' target filename can't be opened Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 05/21] error: New QERR_DUPLICATE_ID Luiz Capitulino
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Luiz Capitulino, qemu-devel, Markus Armbruster

From: Markus Armbruster <armbru@redhat.com>

Add suitable comments to help keerp them in order.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 qerror.c |   12 ++++++++----
 qerror.h |    8 +++++---
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/qerror.c b/qerror.c
index eaa1deb..4520b0d 100644
--- a/qerror.c
+++ b/qerror.c
@@ -38,6 +38,10 @@ static const QType qerror_type = {
  * for example:
  *
  * "running out of foo: %(foo)%%"
+ *
+ * Please keep the entries in alphabetical order.
+ * Use "sed -n '/^static.*qerror_table\[\]/,/^};/s/QERR_/&/gp' qerror.c | sort -c"
+ * to check.
  */
 static const QErrorStringTable qerror_table[] = {
     {
@@ -65,10 +69,6 @@ static const QErrorStringTable qerror_table[] = {
         .desc      = "Device '%(device)' could not be initialized",
     },
     {
-        .error_fmt = QERR_DEVICE_NOT_ENCRYPTED,
-        .desc      = "Device '%(device)' is not encrypted",
-    },
-    {
         .error_fmt = QERR_DEVICE_LOCKED,
         .desc      = "Device '%(device)' is locked",
     },
@@ -81,6 +81,10 @@ static const QErrorStringTable qerror_table[] = {
         .desc      = "Device '%(device)' has not been activated by the guest",
     },
     {
+        .error_fmt = QERR_DEVICE_NOT_ENCRYPTED,
+        .desc      = "Device '%(device)' is not encrypted",
+    },
+    {
         .error_fmt = QERR_DEVICE_NOT_FOUND,
         .desc      = "Device '%(device)' not found",
     },
diff --git a/qerror.h b/qerror.h
index dd298d4..a2664ab 100644
--- a/qerror.h
+++ b/qerror.h
@@ -46,6 +46,8 @@ QError *qobject_to_qerror(const QObject *obj);
 
 /*
  * QError class list
+ * Please keep the definitions in alphabetical order.
+ * Use "grep '^#define QERR_' qerror.h | sort -c" to check.
  */
 #define QERR_BAD_BUS_FOR_DEVICE \
     "{ 'class': 'BadBusForDevice', 'data': { 'device': %s, 'bad_bus_type': %s } }"
@@ -62,9 +64,6 @@ QError *qobject_to_qerror(const QObject *obj);
 #define QERR_DEVICE_ENCRYPTED \
     "{ 'class': 'DeviceEncrypted', 'data': { 'device': %s } }"
 
-#define QERR_DEVICE_NOT_ENCRYPTED \
-    "{ 'class': 'DeviceNotEncrypted', 'data': { 'device': %s } }"
-
 #define QERR_DEVICE_INIT_FAILED \
     "{ 'class': 'DeviceInitFailed', 'data': { 'device': %s } }"
 
@@ -77,6 +76,9 @@ QError *qobject_to_qerror(const QObject *obj);
 #define QERR_DEVICE_NOT_ACTIVE \
     "{ 'class': 'DeviceNotActive', 'data': { 'device': %s } }"
 
+#define QERR_DEVICE_NOT_ENCRYPTED \
+    "{ 'class': 'DeviceNotEncrypted', 'data': { 'device': %s } }"
+
 #define QERR_DEVICE_NOT_FOUND \
     "{ 'class': 'DeviceNotFound', 'data': { 'device': %s } }"
 
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 05/21] error: New QERR_DUPLICATE_ID
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (3 preceding siblings ...)
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 04/21] error: Put error definitions back in alphabetical order Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 06/21] error: Convert qemu_opts_create() to QError Luiz Capitulino
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Luiz Capitulino, qemu-devel, Markus Armbruster

From: Markus Armbruster <armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 qerror.c |    4 ++++
 qerror.h |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/qerror.c b/qerror.c
index 4520b0d..9fb817e 100644
--- a/qerror.c
+++ b/qerror.c
@@ -97,6 +97,10 @@ static const QErrorStringTable qerror_table[] = {
         .desc      = "Device '%(device)' has no child bus",
     },
     {
+        .error_fmt = QERR_DUPLICATE_ID,
+        .desc      = "Duplicate ID '%(id)' for %(object)",
+    },
+    {
         .error_fmt = QERR_FD_NOT_FOUND,
         .desc      = "File descriptor named '%(name)' not found",
     },
diff --git a/qerror.h b/qerror.h
index a2664ab..870cdc3 100644
--- a/qerror.h
+++ b/qerror.h
@@ -88,6 +88,9 @@ QError *qobject_to_qerror(const QObject *obj);
 #define QERR_DEVICE_NO_BUS \
     "{ 'class': 'DeviceNoBus', 'data': { 'device': %s } }"
 
+#define QERR_DUPLICATE_ID \
+    "{ 'class': 'DuplicateId', 'data': { 'id': %s, 'object': %s } }"
+
 #define QERR_FD_NOT_FOUND \
     "{ 'class': 'FdNotFound', 'data': { 'name': %s } }"
 
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 06/21] error: Convert qemu_opts_create() to QError
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (4 preceding siblings ...)
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 05/21] error: New QERR_DUPLICATE_ID Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 07/21] error: New QERR_INVALID_PARAMETER_VALUE Luiz Capitulino
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Luiz Capitulino, qemu-devel, Markus Armbruster

From: Markus Armbruster <armbru@redhat.com>

Fixes device_add to report duplicate ID properly in QMP, as
DuplicateId instead of UndefinedError.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 qemu-option.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qemu-option.c b/qemu-option.c
index f83d07c..12ce322 100644
--- a/qemu-option.c
+++ b/qemu-option.c
@@ -30,6 +30,7 @@
 #include "qemu-error.h"
 #include "qemu-objects.h"
 #include "qemu-option.h"
+#include "qerror.h"
 
 /*
  * Extracts the name of an option from the parameter string (p points at the
@@ -643,8 +644,7 @@ QemuOpts *qemu_opts_create(QemuOptsList *list, const char *id, int fail_if_exist
         opts = qemu_opts_find(list, id);
         if (opts != NULL) {
             if (fail_if_exists) {
-                fprintf(stderr, "tried to create id \"%s\" twice for \"%s\"\n",
-                        id, list->name);
+                qerror_report(QERR_DUPLICATE_ID, id, list->name);
                 return NULL;
             } else {
                 return opts;
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 07/21] error: New QERR_INVALID_PARAMETER_VALUE
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (5 preceding siblings ...)
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 06/21] error: Convert qemu_opts_create() to QError Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 08/21] error: Convert qemu_opts_set() to QError Luiz Capitulino
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Luiz Capitulino, qemu-devel, Markus Armbruster

From: Markus Armbruster <armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 qerror.c |    4 ++++
 qerror.h |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/qerror.c b/qerror.c
index 9fb817e..97e8d4a 100644
--- a/qerror.c
+++ b/qerror.c
@@ -121,6 +121,10 @@ static const QErrorStringTable qerror_table[] = {
         .desc      = "Invalid parameter type, expected: %(expected)",
     },
     {
+        .error_fmt = QERR_INVALID_PARAMETER_VALUE,
+        .desc      = "Parameter '%(name)' expects %(expected)",
+    },
+    {
         .error_fmt = QERR_INVALID_PASSWORD,
         .desc      = "Password incorrect",
     },
diff --git a/qerror.h b/qerror.h
index 870cdc3..5625d54 100644
--- a/qerror.h
+++ b/qerror.h
@@ -106,6 +106,9 @@ QError *qobject_to_qerror(const QObject *obj);
 #define QERR_INVALID_PARAMETER_TYPE \
     "{ 'class': 'InvalidParameterType', 'data': { 'name': %s,'expected': %s } }"
 
+#define QERR_INVALID_PARAMETER_VALUE \
+    "{ 'class': 'InvalidParameterValue', 'data': { 'name': %s, 'expected': %s } }"
+
 #define QERR_INVALID_PASSWORD \
     "{ 'class': 'InvalidPassword', 'data': {} }"
 
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 08/21] error: Convert qemu_opts_set() to QError
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (6 preceding siblings ...)
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 07/21] error: New QERR_INVALID_PARAMETER_VALUE Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 09/21] error: Drop extra messages after qemu_opts_set() and qemu_opts_parse() Luiz Capitulino
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Luiz Capitulino, qemu-devel, Markus Armbruster

From: Markus Armbruster <armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 qemu-option.c |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/qemu-option.c b/qemu-option.c
index 12ce322..394c763 100644
--- a/qemu-option.c
+++ b/qemu-option.c
@@ -176,7 +176,7 @@ static int parse_option_bool(const char *name, const char *value, int *ret)
         } else if (!strcmp(value, "off")) {
             *ret = 0;
         } else {
-            fprintf(stderr, "Option '%s': Use 'on' or 'off'\n", name);
+            qerror_report(QERR_INVALID_PARAMETER_VALUE, name, "'on' or 'off'");
             return -1;
         }
     } else {
@@ -193,12 +193,12 @@ static int parse_option_number(const char *name, const char *value, uint64_t *re
     if (value != NULL) {
         number = strtoull(value, &postfix, 0);
         if (*postfix != '\0') {
-            fprintf(stderr, "Option '%s' needs a number as parameter\n", name);
+            qerror_report(QERR_INVALID_PARAMETER_VALUE, name, "a number");
             return -1;
         }
         *ret = number;
     } else {
-        fprintf(stderr, "Option '%s' needs a parameter\n", name);
+        qerror_report(QERR_INVALID_PARAMETER_VALUE, name, "a number");
         return -1;
     }
     return 0;
@@ -226,13 +226,13 @@ static int parse_option_size(const char *name, const char *value, uint64_t *ret)
             *ret = (uint64_t) sizef;
             break;
         default:
-            fprintf(stderr, "Option '%s' needs size as parameter\n", name);
-            fprintf(stderr, "You may use k, M, G or T suffixes for "
+            qerror_report(QERR_INVALID_PARAMETER_VALUE, name, "a size");
+            error_printf_unless_qmp("You may use k, M, G or T suffixes for "
                     "kilobytes, megabytes, gigabytes and terabytes.\n");
             return -1;
         }
     } else {
-        fprintf(stderr, "Option '%s' needs a parameter\n", name);
+        qerror_report(QERR_INVALID_PARAMETER_VALUE, name, "a size");
         return -1;
     }
     return 0;
@@ -581,8 +581,7 @@ int qemu_opt_set(QemuOpts *opts, const char *name, const char *value)
         if (i == 0) {
             /* empty list -> allow any */;
         } else {
-            fprintf(stderr, "option \"%s\" is not valid for %s\n",
-                    name, opts->list->name);
+            qerror_report(QERR_INVALID_PARAMETER, name);
             return -1;
         }
     }
@@ -598,8 +597,6 @@ int qemu_opt_set(QemuOpts *opts, const char *name, const char *value)
         opt->str = qemu_strdup(value);
     }
     if (qemu_opt_parse(opt) < 0) {
-        fprintf(stderr, "Failed to parse \"%s\" for \"%s.%s\"\n", opt->str,
-                opts->list->name, opt->name);
         qemu_opt_del(opt);
         return -1;
     }
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 09/21] error: Drop extra messages after qemu_opts_set() and qemu_opts_parse()
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (7 preceding siblings ...)
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 08/21] error: Convert qemu_opts_set() to QError Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 10/21] error: Use QERR_INVALID_PARAMETER_VALUE instead of QERR_INVALID_PARAMETER Luiz Capitulino
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Luiz Capitulino, qemu-devel, Markus Armbruster

From: Markus Armbruster <armbru@redhat.com>

Both functions report errors nicely enough now, no need for additional
messages.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 hw/pci-hotplug.c |    2 --
 net.c            |    2 --
 qemu-config.c    |    1 -
 vl.c             |    5 -----
 4 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index eb3701b..343fd17 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -56,8 +56,6 @@ static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon,
 
     opts = qemu_opts_parse(&qemu_net_opts, opts_str ? opts_str : "", 0);
     if (!opts) {
-        monitor_printf(mon, "parsing network options '%s' failed\n",
-                       opts_str ? opts_str : "");
         return NULL;
     }
 
diff --git a/net.c b/net.c
index 3ede738..28d106b 100644
--- a/net.c
+++ b/net.c
@@ -1169,8 +1169,6 @@ void net_host_device_add(Monitor *mon, const QDict *qdict)
 
     opts = qemu_opts_parse(&qemu_net_opts, opts_str ? opts_str : "", 0);
     if (!opts) {
-        monitor_printf(mon, "parsing network options '%s' failed\n",
-                       opts_str ? opts_str : "");
         return;
     }
 
diff --git a/qemu-config.c b/qemu-config.c
index 150157c..d4a2f43 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -472,7 +472,6 @@ int qemu_config_parse(FILE *fp, const char *fname)
                 goto out;
             }
             if (qemu_opt_set(opts, arg, value) != 0) {
-                error_report("failed to set \"%s\" for %s", arg, group);
                 goto out;
             }
             continue;
diff --git a/vl.c b/vl.c
index 6768cf1..e645006 100644
--- a/vl.c
+++ b/vl.c
@@ -729,8 +729,6 @@ QemuOpts *drive_add(const char *file, const char *fmt, ...)
 
     opts = qemu_opts_parse(&qemu_drive_opts, optstr, 0);
     if (!opts) {
-        fprintf(stderr, "%s: huh? duplicate? (%s)\n",
-                __FUNCTION__, optstr);
         return NULL;
     }
     if (file)
@@ -3146,7 +3144,6 @@ int main(int argc, char **argv, char **envp)
             case QEMU_OPTION_mon:
                 opts = qemu_opts_parse(&qemu_mon_opts, optarg, 1);
                 if (!opts) {
-                    fprintf(stderr, "parse error: %s\n", optarg);
                     exit(1);
                 }
                 default_monitor = 0;
@@ -3154,7 +3151,6 @@ int main(int argc, char **argv, char **envp)
             case QEMU_OPTION_chardev:
                 opts = qemu_opts_parse(&qemu_chardev_opts, optarg, 1);
                 if (!opts) {
-                    fprintf(stderr, "parse error: %s\n", optarg);
                     exit(1);
                 }
                 break;
@@ -3352,7 +3348,6 @@ int main(int argc, char **argv, char **envp)
             case QEMU_OPTION_rtc:
                 opts = qemu_opts_parse(&qemu_rtc_opts, optarg, 0);
                 if (!opts) {
-                    fprintf(stderr, "parse error: %s\n", optarg);
                     exit(1);
                 }
                 configure_rtc(opts);
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 10/21] error: Use QERR_INVALID_PARAMETER_VALUE instead of QERR_INVALID_PARAMETER
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (8 preceding siblings ...)
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 09/21] error: Drop extra messages after qemu_opts_set() and qemu_opts_parse() Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 11/21] error: Convert qemu_opts_validate() to QError Luiz Capitulino
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Luiz Capitulino, qemu-devel, Markus Armbruster

From: Markus Armbruster <armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 hw/qdev.c |    2 +-
 monitor.c |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/hw/qdev.c b/hw/qdev.c
index 5ca126b..d3bf0fa 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -207,7 +207,7 @@ DeviceState *qdev_device_add(QemuOpts *opts)
     /* find driver */
     info = qdev_find_info(NULL, driver);
     if (!info || info->no_user) {
-        qerror_report(QERR_INVALID_PARAMETER, "driver");
+        qerror_report(QERR_INVALID_PARAMETER_VALUE, "driver", "a driver name");
         error_printf_unless_qmp("Try with argument '?' for a list.\n");
         return NULL;
     }
diff --git a/monitor.c b/monitor.c
index 89952e8..792c8ce 100644
--- a/monitor.c
+++ b/monitor.c
@@ -970,7 +970,8 @@ static int do_cpu_set(Monitor *mon, const QDict *qdict, QObject **ret_data)
 {
     int index = qdict_get_int(qdict, "index");
     if (mon_set_cpu(index) < 0) {
-        qerror_report(QERR_INVALID_PARAMETER, "index");
+        qerror_report(QERR_INVALID_PARAMETER_VALUE, "index",
+                      "a CPU number");
         return -1;
     }
     return 0;
@@ -2490,7 +2491,8 @@ static int do_getfd(Monitor *mon, const QDict *qdict, QObject **ret_data)
     }
 
     if (qemu_isdigit(fdname[0])) {
-        qerror_report(QERR_INVALID_PARAMETER, "fdname");
+        qerror_report(QERR_INVALID_PARAMETER_VALUE, "fdname",
+                      "a name not starting with a digit");
         return -1;
     }
 
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 11/21] error: Convert qemu_opts_validate() to QError
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (9 preceding siblings ...)
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 10/21] error: Use QERR_INVALID_PARAMETER_VALUE instead of QERR_INVALID_PARAMETER Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 12/21] error: Convert net_client_init() " Luiz Capitulino
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Luiz Capitulino, qemu-devel, Markus Armbruster

From: Markus Armbruster <armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 qemu-option.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/qemu-option.c b/qemu-option.c
index 394c763..1ffc497 100644
--- a/qemu-option.c
+++ b/qemu-option.c
@@ -877,8 +877,7 @@ int qemu_opts_validate(QemuOpts *opts, const QemuOptDesc *desc)
             }
         }
         if (desc[i].name == NULL) {
-            fprintf(stderr, "option \"%s\" is not valid for %s\n",
-                    opt->name, opts->list->name);
+            qerror_report(QERR_INVALID_PARAMETER, opt->name);
             return -1;
         }
 
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 12/21] error: Convert net_client_init() to QError
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (10 preceding siblings ...)
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 11/21] error: Convert qemu_opts_validate() to QError Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 13/21] error: New QERR_DEVICE_IN_USE Luiz Capitulino
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Luiz Capitulino, qemu-devel, Markus Armbruster

From: Markus Armbruster <armbru@redhat.com>

The conversion is shallow: client type init() methods aren't
converted.  Converting them is a big job for relatively little
practical benefit, so leave it for later.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 net.c |   38 ++++++++++++++++++--------------------
 1 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/net.c b/net.c
index 28d106b..71c0828 100644
--- a/net.c
+++ b/net.c
@@ -1065,18 +1065,12 @@ int net_client_init(Monitor *mon, QemuOpts *opts, int is_netdev)
     int i;
 
     type = qemu_opt_get(opts, "type");
+    if (!type) {
+        qerror_report(QERR_MISSING_PARAMETER, "type");
+        return -1;
+    }
 
-    if (!is_netdev) {
-        if (!type) {
-            error_report("No type specified for -net");
-            return -1;
-        }
-    } else {
-        if (!type) {
-            error_report("No type specified for -netdev");
-            return -1;
-        }
-
+    if (is_netdev) {
         if (strcmp(type, "tap") != 0 &&
 #ifdef CONFIG_SLIRP
             strcmp(type, "user") != 0 &&
@@ -1085,21 +1079,21 @@ int net_client_init(Monitor *mon, QemuOpts *opts, int is_netdev)
             strcmp(type, "vde") != 0 &&
 #endif
             strcmp(type, "socket") != 0) {
-            error_report("The '%s' network backend type is not valid with -netdev",
-                         type);
+            qerror_report(QERR_INVALID_PARAMETER_VALUE, "type",
+                          "a netdev backend type");
             return -1;
         }
 
         if (qemu_opt_get(opts, "vlan")) {
-            error_report("The 'vlan' parameter is not valid with -netdev");
+            qerror_report(QERR_INVALID_PARAMETER, "vlan");
             return -1;
         }
         if (qemu_opt_get(opts, "name")) {
-            error_report("The 'name' parameter is not valid with -netdev");
+            qerror_report(QERR_INVALID_PARAMETER, "name");
             return -1;
         }
         if (!qemu_opts_id(opts)) {
-            error_report("The id= parameter is required with -netdev");
+            qerror_report(QERR_MISSING_PARAMETER, "id");
             return -1;
         }
     }
@@ -1125,14 +1119,18 @@ int net_client_init(Monitor *mon, QemuOpts *opts, int is_netdev)
             }
 
             if (net_client_types[i].init) {
-                return net_client_types[i].init(opts, mon, name, vlan);
-            } else {
-                return 0;
+                if (net_client_types[i].init(opts, mon, name, vlan) < 0) {
+                    /* TODO push error reporting into init() methods */
+                    qerror_report(QERR_DEVICE_INIT_FAILED, type);
+                    return -1;
+                }
             }
+            return 0;
         }
     }
 
-    error_report("Invalid -net type '%s'", type);
+    qerror_report(QERR_INVALID_PARAMETER_VALUE, "type",
+                  "a network client type");
     return -1;
 }
 
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 13/21] error: New QERR_DEVICE_IN_USE
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (11 preceding siblings ...)
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 12/21] error: Convert net_client_init() " Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 14/21] monitor: New commands netdev_add, netdev_del Luiz Capitulino
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Luiz Capitulino, qemu-devel, Markus Armbruster

From: Markus Armbruster <armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 qerror.c |    4 ++++
 qerror.h |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/qerror.c b/qerror.c
index 97e8d4a..8d885cd 100644
--- a/qerror.c
+++ b/qerror.c
@@ -69,6 +69,10 @@ static const QErrorStringTable qerror_table[] = {
         .desc      = "Device '%(device)' could not be initialized",
     },
     {
+        .error_fmt = QERR_DEVICE_IN_USE,
+        .desc      = "Device '%(device)' is in use",
+    },
+    {
         .error_fmt = QERR_DEVICE_LOCKED,
         .desc      = "Device '%(device)' is locked",
     },
diff --git a/qerror.h b/qerror.h
index 5625d54..bae08c0 100644
--- a/qerror.h
+++ b/qerror.h
@@ -67,6 +67,9 @@ QError *qobject_to_qerror(const QObject *obj);
 #define QERR_DEVICE_INIT_FAILED \
     "{ 'class': 'DeviceInitFailed', 'data': { 'device': %s } }"
 
+#define QERR_DEVICE_IN_USE \
+    "{ 'class': 'DeviceInUse', 'data': { 'device': %s } }"
+
 #define QERR_DEVICE_LOCKED \
     "{ 'class': 'DeviceLocked', 'data': { 'device': %s } }"
 
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 14/21] monitor: New commands netdev_add, netdev_del
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (12 preceding siblings ...)
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 13/21] error: New QERR_DEVICE_IN_USE Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 15/21] monitor: Rename argument type 'b' to 'f' Luiz Capitulino
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Luiz Capitulino, qemu-devel, Markus Armbruster

From: Markus Armbruster <armbru@redhat.com>

Monitor commands to go with -netdev.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 net.c           |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 net.h           |    2 ++
 qemu-monitor.hx |   30 ++++++++++++++++++++++++++++++
 3 files changed, 87 insertions(+), 0 deletions(-)

diff --git a/net.c b/net.c
index 71c0828..9a95451 100644
--- a/net.c
+++ b/net.c
@@ -1194,6 +1194,61 @@ void net_host_device_remove(Monitor *mon, const QDict *qdict)
     qemu_del_vlan_client(vc);
 }
 
+/**
+ * do_netdev_add(): Add a host network device
+ *
+ * Argument qdict contains
+ * - "type": the device type, "tap", "user", ...
+ * - "id": the device's ID (must be unique)
+ * - device options
+ *
+ * Example:
+ *
+ * { "type": "user", "id": "netdev1", "hostname": "a-guest" }
+ */
+int do_netdev_add(Monitor *mon, const QDict *qdict, QObject **ret_data)
+{
+    QemuOpts *opts;
+    int res;
+
+    opts = qemu_opts_from_qdict(&qemu_netdev_opts, qdict);
+    if (!opts) {
+        return -1;
+    }
+
+    res = net_client_init(mon, opts, 1);
+    return res;
+}
+
+/**
+ * do_netdev_del(): Delete a host network device
+ *
+ * Argument qdict contains
+ * - "id": the device's ID
+ *
+ * Example:
+ *
+ * { "id": "netdev1" }
+ */
+int do_netdev_del(Monitor *mon, const QDict *qdict, QObject **ret_data)
+{
+    const char *id = qdict_get_str(qdict, "id");
+    VLANClientState *vc;
+
+    vc = qemu_find_netdev(id);
+    if (!vc || vc->info->type == NET_CLIENT_TYPE_NIC) {
+        qerror_report(QERR_DEVICE_NOT_FOUND, id);
+        return -1;
+    }
+    if (vc->peer) {
+        qerror_report(QERR_DEVICE_IN_USE, id);
+        return -1;
+    }
+    qemu_del_vlan_client(vc);
+    qemu_opts_del(qemu_opts_find(&qemu_netdev_opts, id));
+    return 0;
+}
+
 void net_set_boot_mask(int net_boot_mask)
 {
     int i;
diff --git a/net.h b/net.h
index 16f19c5..ce9e2c6 100644
--- a/net.h
+++ b/net.h
@@ -166,6 +166,8 @@ void net_cleanup(void);
 void net_set_boot_mask(int boot_mask);
 void net_host_device_add(Monitor *mon, const QDict *qdict);
 void net_host_device_remove(Monitor *mon, const QDict *qdict);
+int do_netdev_add(Monitor *mon, const QDict *qdict, QObject **ret_data);
+int do_netdev_del(Monitor *mon, const QDict *qdict, QObject **ret_data);
 
 #define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
 #define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index d290b4b..31087bd 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -914,6 +914,36 @@ STEXI
 Remove host VLAN client.
 ETEXI
 
+    {
+        .name       = "netdev_add",
+        .args_type  = "netdev:O",
+        .params     = "[user|tap|socket],id=str[,prop=value][,...]",
+        .help       = "add host network device",
+        .user_print = monitor_user_noop,
+        .mhandler.cmd_new = do_netdev_add,
+    },
+
+STEXI
+@item netdev_add
+@findex netdev_add
+Add host network device.
+ETEXI
+
+    {
+        .name       = "netdev_del",
+        .args_type  = "id:s",
+        .params     = "id",
+        .help       = "remove host network device",
+        .user_print = monitor_user_noop,
+        .mhandler.cmd_new = do_netdev_del,
+    },
+
+STEXI
+@item netdev_del
+@findex netdev_del
+Remove host network device.
+ETEXI
+
 #ifdef CONFIG_SLIRP
     {
         .name       = "hostfwd_add",
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 15/21] monitor: Rename argument type 'b' to 'f'
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (13 preceding siblings ...)
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 14/21] monitor: New commands netdev_add, netdev_del Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 16/21] monitor: New argument type 'b' Luiz Capitulino
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Luiz Capitulino, qemu-devel, Markus Armbruster

From: Markus Armbruster <armbru@redhat.com>

To make 'b' available for boolean argument.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 monitor.c       |    8 ++++----
 qemu-monitor.hx |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/monitor.c b/monitor.c
index 792c8ce..d3b360c 100644
--- a/monitor.c
+++ b/monitor.c
@@ -74,7 +74,7 @@
  * 'l'          target long (32 or 64 bit)
  * 'M'          just like 'l', except in user mode the value is
  *              multiplied by 2^20 (think Mebibyte)
- * 'b'          double
+ * 'f'          double
  *              user mode accepts an optional G, g, M, m, K, k suffix,
  *              which multiplies the value by 2^30 for suffixes G and
  *              g, 2^20 for M and m, 2^10 for K and k
@@ -3799,7 +3799,7 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
                 qdict_put(qdict, key, qint_from_int(val));
             }
             break;
-        case 'b':
+        case 'f':
         case 'T':
             {
                 double val;
@@ -3815,7 +3815,7 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
                 if (get_double(mon, &val, &p) < 0) {
                     goto fail;
                 }
-                if (c == 'b' && *p) {
+                if (c == 'f' && *p) {
                     switch (*p) {
                     case 'K': case 'k':
                         val *= 1 << 10; p++; break;
@@ -4316,7 +4316,7 @@ static int check_arg(const CmdArgs *cmd_args, QDict *args)
                 return -1;
             }
             break;
-        case 'b':
+        case 'f':
         case 'T':
             if (qobject_type(value) != QTYPE_QINT && qobject_type(value) != QTYPE_QFLOAT) {
                 qerror_report(QERR_INVALID_PARAMETER_TYPE, name, "number");
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 31087bd..8c9a41c 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -804,7 +804,7 @@ ETEXI
 
     {
         .name       = "migrate_set_speed",
-        .args_type  = "value:b",
+        .args_type  = "value:f",
         .params     = "value",
         .help       = "set maximum speed (in bytes) for migrations",
         .user_print = monitor_user_noop,
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 16/21] monitor: New argument type 'b'
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (14 preceding siblings ...)
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 15/21] monitor: Rename argument type 'b' to 'f' Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 17/21] monitor: Use argument type 'b' for set_link Luiz Capitulino
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Luiz Capitulino, qemu-devel, Markus Armbruster

From: Markus Armbruster <armbru@redhat.com>

This is a boolean value.  Human monitor accepts "on" or "off".
Consistent with option parsing (see parse_option_bool()).

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 monitor.c |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/monitor.c b/monitor.c
index d3b360c..c5a4dbf 100644
--- a/monitor.c
+++ b/monitor.c
@@ -85,6 +85,8 @@
  *
  * '?'          optional type (for all types, except '/')
  * '.'          other form of optional type (for 'i' and 'l')
+ * 'b'          boolean
+ *              user mode accepts "on" or "off"
  * '-'          optional parameter (eg. '-f')
  *
  */
@@ -3842,6 +3844,29 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
                 qdict_put(qdict, key, qfloat_from_double(val));
             }
             break;
+        case 'b':
+            {
+                const char *beg;
+                int val;
+
+                while (qemu_isspace(*p)) {
+                    p++;
+                }
+                beg = p;
+                while (qemu_isgraph(*p)) {
+                    p++;
+                }
+                if (p - beg == 2 && !memcmp(beg, "on", p - beg)) {
+                    val = 1;
+                } else if (p - beg == 3 && !memcmp(beg, "off", p - beg)) {
+                    val = 0;
+                } else {
+                    monitor_printf(mon, "Expected 'on' or 'off'\n");
+                    goto fail;
+                }
+                qdict_put(qdict, key, qbool_from_int(val));
+            }
+            break;
         case '-':
             {
                 const char *tmp = p;
@@ -4323,6 +4348,12 @@ static int check_arg(const CmdArgs *cmd_args, QDict *args)
                 return -1;
             }
             break;
+        case 'b':
+            if (qobject_type(value) != QTYPE_QBOOL) {
+                qerror_report(QERR_INVALID_PARAMETER_TYPE, name, "bool");
+                return -1;
+            }
+            break;
         case '-':
             if (qobject_type(value) != QTYPE_QINT &&
                 qobject_type(value) != QTYPE_QBOOL) {
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 17/21] monitor: Use argument type 'b' for set_link
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (15 preceding siblings ...)
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 16/21] monitor: New argument type 'b' Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 18/21] monitor: Convert do_set_link() to QObject, QError Luiz Capitulino
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Luiz Capitulino, qemu-devel, Markus Armbruster

From: Markus Armbruster <armbru@redhat.com>

Second argument is now "on" or "off" instead of "up" or "down".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 net.c           |   10 ++--------
 qemu-monitor.hx |    8 ++++----
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/net.c b/net.c
index 9a95451..e625614 100644
--- a/net.c
+++ b/net.c
@@ -1296,7 +1296,7 @@ void do_set_link(Monitor *mon, const QDict *qdict)
     VLANState *vlan;
     VLANClientState *vc = NULL;
     const char *name = qdict_get_str(qdict, "name");
-    const char *up_or_down = qdict_get_str(qdict, "up_or_down");
+    int up = qdict_get_bool(qdict, "up");
 
     QTAILQ_FOREACH(vlan, &vlans, next) {
         QTAILQ_FOREACH(vc, &vlan->clients, next) {
@@ -1313,13 +1313,7 @@ done:
         return;
     }
 
-    if (strcmp(up_or_down, "up") == 0)
-        vc->link_down = 0;
-    else if (strcmp(up_or_down, "down") == 0)
-        vc->link_down = 1;
-    else
-        monitor_printf(mon, "invalid link status '%s'; only 'up' or 'down' "
-                       "valid\n", up_or_down);
+    vc->link_down = !up;
 
     if (vc->info->link_status_changed) {
         vc->info->link_status_changed(vc);
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 8c9a41c..7b7dcf5 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -986,16 +986,16 @@ ETEXI
 
     {
         .name       = "set_link",
-        .args_type  = "name:s,up_or_down:s",
-        .params     = "name up|down",
+        .args_type  = "name:s,up:b",
+        .params     = "name on|off",
         .help       = "change the link status of a network adapter",
         .mhandler.cmd = do_set_link,
     },
 
 STEXI
-@item set_link @var{name} [up|down]
+@item set_link @var{name} [on|off]
 @findex set_link
-Set link @var{name} up or down.
+Switch link @var{name} on (i.e. up) or off (i.e. down).
 ETEXI
 
     {
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 18/21] monitor: Convert do_set_link() to QObject, QError
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (16 preceding siblings ...)
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 17/21] monitor: Use argument type 'b' for set_link Luiz Capitulino
@ 2010-04-05 20:33 ` Luiz Capitulino
  2010-04-05 20:34 ` [Qemu-devel] [PATCH 19/21] virtio-blk: Fix use after free in error case Luiz Capitulino
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:33 UTC (permalink / raw)
  To: aliguori; +Cc: Luiz Capitulino, qemu-devel, Markus Armbruster

From: Markus Armbruster <armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 net.c           |    7 ++++---
 net.h           |    2 +-
 qemu-monitor.hx |    3 ++-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/net.c b/net.c
index e625614..d7d76eb 100644
--- a/net.c
+++ b/net.c
@@ -1291,7 +1291,7 @@ void do_info_network(Monitor *mon)
     }
 }
 
-void do_set_link(Monitor *mon, const QDict *qdict)
+int do_set_link(Monitor *mon, const QDict *qdict, QObject **ret_data)
 {
     VLANState *vlan;
     VLANClientState *vc = NULL;
@@ -1309,8 +1309,8 @@ void do_set_link(Monitor *mon, const QDict *qdict)
 done:
 
     if (!vc) {
-        monitor_printf(mon, "could not find network device '%s'\n", name);
-        return;
+        qerror_report(QERR_DEVICE_NOT_FOUND, name);
+        return -1;
     }
 
     vc->link_down = !up;
@@ -1318,6 +1318,7 @@ done:
     if (vc->info->link_status_changed) {
         vc->info->link_status_changed(vc);
     }
+    return 0;
 }
 
 void net_cleanup(void)
diff --git a/net.h b/net.h
index ce9e2c6..c7a3a1b 100644
--- a/net.h
+++ b/net.h
@@ -118,7 +118,7 @@ int qemu_find_nic_model(NICInfo *nd, const char * const *models,
                         const char *default_model);
 
 void do_info_network(Monitor *mon);
-void do_set_link(Monitor *mon, const QDict *qdict);
+int do_set_link(Monitor *mon, const QDict *qdict, QObject **ret_data);
 
 /* NIC info */
 
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 7b7dcf5..62fa346 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -989,7 +989,8 @@ ETEXI
         .args_type  = "name:s,up:b",
         .params     = "name on|off",
         .help       = "change the link status of a network adapter",
-        .mhandler.cmd = do_set_link,
+        .user_print = monitor_user_noop,
+        .mhandler.cmd_new = do_set_link,
     },
 
 STEXI
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 19/21] virtio-blk: Fix use after free in error case
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (17 preceding siblings ...)
  2010-04-05 20:33 ` [Qemu-devel] [PATCH 18/21] monitor: Convert do_set_link() to QObject, QError Luiz Capitulino
@ 2010-04-05 20:34 ` Luiz Capitulino
  2010-04-05 20:34 ` [Qemu-devel] [PATCH 20/21] QMP: Improve RTC_CHANGE event description Luiz Capitulino
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:34 UTC (permalink / raw)
  To: aliguori; +Cc: Kevin Wolf, qemu-devel, Luiz Capitulino

From: Kevin Wolf <kwolf@redhat.com>

virtio_blk_req_complete frees the request, so we can't access it any more when
calling bdrv_mon_event. Use the pointer that was copied earlier.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 hw/virtio-blk.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 9915840..01d77b8 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -65,7 +65,7 @@ static int virtio_blk_handle_rw_error(VirtIOBlockReq *req, int error,
     VirtIOBlock *s = req->dev;
 
     if (action == BLOCK_ERR_IGNORE) {
-        bdrv_mon_event(req->dev->bs, BDRV_ACTION_IGNORE, is_read);
+        bdrv_mon_event(s->bs, BDRV_ACTION_IGNORE, is_read);
         return 0;
     }
 
@@ -73,11 +73,11 @@ static int virtio_blk_handle_rw_error(VirtIOBlockReq *req, int error,
             || action == BLOCK_ERR_STOP_ANY) {
         req->next = s->rq;
         s->rq = req;
-        bdrv_mon_event(req->dev->bs, BDRV_ACTION_STOP, is_read);
+        bdrv_mon_event(s->bs, BDRV_ACTION_STOP, is_read);
         vm_stop(0);
     } else {
         virtio_blk_req_complete(req, VIRTIO_BLK_S_IOERR);
-        bdrv_mon_event(req->dev->bs, BDRV_ACTION_REPORT, is_read);
+        bdrv_mon_event(s->bs, BDRV_ACTION_REPORT, is_read);
     }
 
     return 1;
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 20/21] QMP: Improve RTC_CHANGE event description
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (18 preceding siblings ...)
  2010-04-05 20:34 ` [Qemu-devel] [PATCH 19/21] virtio-blk: Fix use after free in error case Luiz Capitulino
@ 2010-04-05 20:34 ` Luiz Capitulino
  2010-04-05 20:34 ` [Qemu-devel] [PATCH 21/21] Monitor: Convert do_screen_dump() to QObject Luiz Capitulino
  2010-04-18 21:58 ` [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Aurelien Jarno
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:34 UTC (permalink / raw)
  To: aliguori; +Cc: qemu-devel, Luiz Capitulino

Some people might think that this event is emitted whenever the
time changes, be more specific.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 QMP/qmp-events.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt
index a94e9b4..c084a47 100644
--- a/QMP/qmp-events.txt
+++ b/QMP/qmp-events.txt
@@ -41,7 +41,7 @@ Example:
 RTC_CHANGE
 ----------
 
-Emitted when the RTC time changes.
+Emitted when the guest changes the RTC time.
 
 Data:
 
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [Qemu-devel] [PATCH 21/21] Monitor: Convert do_screen_dump() to QObject
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (19 preceding siblings ...)
  2010-04-05 20:34 ` [Qemu-devel] [PATCH 20/21] QMP: Improve RTC_CHANGE event description Luiz Capitulino
@ 2010-04-05 20:34 ` Luiz Capitulino
  2010-04-18 21:58 ` [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Aurelien Jarno
  21 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-05 20:34 UTC (permalink / raw)
  To: aliguori; +Cc: qemu-devel, Luiz Capitulino

Trivial, as it never fails, doesn't have output nor return
any data.

Note that it's also available under QMP, as kvm-autotest
needs this.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 monitor.c       |    3 ++-
 qemu-monitor.hx |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/monitor.c b/monitor.c
index c5a4dbf..709b326 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1164,9 +1164,10 @@ static int do_change(Monitor *mon, const QDict *qdict, QObject **ret_data)
     return ret;
 }
 
-static void do_screen_dump(Monitor *mon, const QDict *qdict)
+static int do_screen_dump(Monitor *mon, const QDict *qdict, QObject **ret_data)
 {
     vga_hw_screen_dump(qdict_get_str(qdict, "filename"));
+    return 0;
 }
 
 static void do_logfile(Monitor *mon, const QDict *qdict)
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 62fa346..5ea5748 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -199,7 +199,8 @@ ETEXI
         .args_type  = "filename:F",
         .params     = "filename",
         .help       = "save screen into PPM image 'filename'",
-        .mhandler.cmd = do_screen_dump,
+        .user_print = monitor_user_noop,
+        .mhandler.cmd_new = do_screen_dump,
     },
 
 STEXI
-- 
1.7.0.4.297.g6555b1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue
  2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
                   ` (20 preceding siblings ...)
  2010-04-05 20:34 ` [Qemu-devel] [PATCH 21/21] Monitor: Convert do_screen_dump() to QObject Luiz Capitulino
@ 2010-04-18 21:58 ` Aurelien Jarno
  2010-04-19 12:53   ` Luiz Capitulino
  21 siblings, 1 reply; 24+ messages in thread
From: Aurelien Jarno @ 2010-04-18 21:58 UTC (permalink / raw)
  To: Luiz Capitulino; +Cc: aliguori, qemu-devel

On Mon, Apr 05, 2010 at 05:33:41PM -0300, Luiz Capitulino wrote:
>  Hi Anthony,
> 
>  I was going to nag you to apply patches from the list, but as I'm maintaining
> a QMP/Monitor queue to test them, I thought it would be a good idea to nag you
> in the form of a git pull :)
> 
>  All the patches in there have been posted to the list already and, to make it
> convenient to review, I'm sending them again in this series (not sure if it's
> a good idea, though).
> 
>  The changes (since 116348def2bb446d972bdc2f44bd77ff631f85de) are available in
> the following repository:
> 
>     git://repo.or.cz/qemu/qmp-unstable.git for-anthony

As Anthony doesn't seem to be available, I have just pulled your tree.

> Kevin Wolf (1):
>       virtio-blk: Fix use after free in error case
> 
> Luiz Capitulino (2):
>       QMP: Improve RTC_CHANGE event description
>       Monitor: Convert do_screen_dump() to QObject
> 
> Markus Armbruster (17):
>       qdev: Convert qdev_unplug() to QError
>       monitor: convert do_device_del() to QObject, QError
>       error: Put error definitions back in alphabetical order
>       error: New QERR_DUPLICATE_ID
>       error: Convert qemu_opts_create() to QError
>       error: New QERR_INVALID_PARAMETER_VALUE
>       error: Convert qemu_opts_set() to QError
>       error: Drop extra messages after qemu_opts_set() and qemu_opts_parse()
>       error: Use QERR_INVALID_PARAMETER_VALUE instead of QERR_INVALID_PARAMETER
>       error: Convert qemu_opts_validate() to QError
>       error: Convert net_client_init() to QError
>       error: New QERR_DEVICE_IN_USE
>       monitor: New commands netdev_add, netdev_del
>       monitor: Rename argument type 'b' to 'f'
>       monitor: New argument type 'b'
>       monitor: Use argument type 'b' for set_link
>       monitor: Convert do_set_link() to QObject, QError
> 
> Ryan Harper (1):
>       Add qerror message if the 'change' target filename can't be opened
> 
>  QMP/qmp-events.txt |    2 +-
>  hw/pci-hotplug.c   |    2 -
>  hw/qdev.c          |   13 +++---
>  hw/qdev.h          |    2 +-
>  hw/virtio-blk.c    |    6 +-
>  monitor.c          |   49 +++++++++++++++++++---
>  net.c              |  112 ++++++++++++++++++++++++++++++++++++---------------
>  net.h              |    4 +-
>  qemu-config.c      |    1 -
>  qemu-monitor.hx    |   49 +++++++++++++++++++----
>  qemu-option.c      |   24 +++++------
>  qerror.c           |   20 ++++++++-
>  qerror.h           |   17 ++++++-
>  vl.c               |    5 --
>  14 files changed, 218 insertions(+), 88 deletions(-)
> 
> 
> 

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue
  2010-04-18 21:58 ` [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Aurelien Jarno
@ 2010-04-19 12:53   ` Luiz Capitulino
  0 siblings, 0 replies; 24+ messages in thread
From: Luiz Capitulino @ 2010-04-19 12:53 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: aliguori, qemu-devel

On Sun, 18 Apr 2010 23:58:43 +0200
Aurelien Jarno <aurelien@aurel32.net> wrote:

> On Mon, Apr 05, 2010 at 05:33:41PM -0300, Luiz Capitulino wrote:
> >  Hi Anthony,
> > 
> >  I was going to nag you to apply patches from the list, but as I'm maintaining
> > a QMP/Monitor queue to test them, I thought it would be a good idea to nag you
> > in the form of a git pull :)
> > 
> >  All the patches in there have been posted to the list already and, to make it
> > convenient to review, I'm sending them again in this series (not sure if it's
> > a good idea, though).
> > 
> >  The changes (since 116348def2bb446d972bdc2f44bd77ff631f85de) are available in
> > the following repository:
> > 
> >     git://repo.or.cz/qemu/qmp-unstable.git for-anthony
> 
> As Anthony doesn't seem to be available, I have just pulled your tree.

 Oh, thank you very much.

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2010-04-19 12:53 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-05 20:33 [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 01/21] qdev: Convert qdev_unplug() to QError Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 02/21] monitor: convert do_device_del() to QObject, QError Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 03/21] Add qerror message if the 'change' target filename can't be opened Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 04/21] error: Put error definitions back in alphabetical order Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 05/21] error: New QERR_DUPLICATE_ID Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 06/21] error: Convert qemu_opts_create() to QError Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 07/21] error: New QERR_INVALID_PARAMETER_VALUE Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 08/21] error: Convert qemu_opts_set() to QError Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 09/21] error: Drop extra messages after qemu_opts_set() and qemu_opts_parse() Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 10/21] error: Use QERR_INVALID_PARAMETER_VALUE instead of QERR_INVALID_PARAMETER Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 11/21] error: Convert qemu_opts_validate() to QError Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 12/21] error: Convert net_client_init() " Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 13/21] error: New QERR_DEVICE_IN_USE Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 14/21] monitor: New commands netdev_add, netdev_del Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 15/21] monitor: Rename argument type 'b' to 'f' Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 16/21] monitor: New argument type 'b' Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 17/21] monitor: Use argument type 'b' for set_link Luiz Capitulino
2010-04-05 20:33 ` [Qemu-devel] [PATCH 18/21] monitor: Convert do_set_link() to QObject, QError Luiz Capitulino
2010-04-05 20:34 ` [Qemu-devel] [PATCH 19/21] virtio-blk: Fix use after free in error case Luiz Capitulino
2010-04-05 20:34 ` [Qemu-devel] [PATCH 20/21] QMP: Improve RTC_CHANGE event description Luiz Capitulino
2010-04-05 20:34 ` [Qemu-devel] [PATCH 21/21] Monitor: Convert do_screen_dump() to QObject Luiz Capitulino
2010-04-18 21:58 ` [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue Aurelien Jarno
2010-04-19 12:53   ` Luiz Capitulino

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.