Patchwork [15/21] monitor: Rename argument type 'b' to 'f'

login
register
mail settings
Submitter Luiz Capitulino
Date April 5, 2010, 8:33 p.m.
Message ID <1270499642-31543-16-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/49455/
State New
Headers show

Comments

Luiz Capitulino - April 5, 2010, 8:33 p.m.
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(-)

Patch

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,