diff mbox

[RFC,11/56] monitor: Drop unused HMP .args_type 'M'

Message ID 1502117160-24655-12-git-send-email-armbru@redhat.com
State New
Headers show

Commit Message

Markus Armbruster Aug. 7, 2017, 2:45 p.m. UTC
The previous commit switched balloon from 'M' to 'o', rendering 'M'
unused.  It was never used for anything else.  Drop it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 monitor.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

Comments

Dr. David Alan Gilbert Aug. 8, 2017, 3:23 p.m. UTC | #1
* Markus Armbruster (armbru@redhat.com) wrote:
> The previous commit switched balloon from 'M' to 'o', rendering 'M'
> unused.  It was never used for anything else.  Drop it.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  monitor.c | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/monitor.c b/monitor.c
> index 8b54ba1..3b2757e 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -101,8 +101,6 @@
>   * TYPEs that put an int64_t value with key NAME:
>   * 'l'    Argument is an expression (QEMU pocket calculator).
>   * 'i'    Like 'l' except value must fit into 32 bit unsigned.
> - * 'M'    Like 'l' except value must not be negative and is multiplied
> - *        by 2^20 (think "mebibyte").
>   *
>   * TYPEs that put an uint64_t value with key NAME:
>   * 'o'    Argument is a size (think "octets").  Without suffix the
> @@ -134,7 +132,7 @@
>   * '?'    Argument is optional, nothing is put when it is absent
>   *        (all types except 'O', '/', 'b').
>   * '.'    Argument is optional, must be preceded by '.' if present
> - *        (only types 'i', 'l', 'M')
> + *        (only types 'i', 'l')
>   */
>  
>  typedef struct mon_cmd_t {
> @@ -2913,7 +2911,6 @@ static QDict *monitor_parse_arguments(Monitor *mon,
>              break;
>          case 'i':
>          case 'l':
> -        case 'M':
>              {
>                  int64_t val;
>  
> @@ -2944,12 +2941,6 @@ static QDict *monitor_parse_arguments(Monitor *mon,
>                      monitor_printf(mon, "\'%s\' has failed: ", cmd->name);
>                      monitor_printf(mon, "integer is for 32-bit values\n");
>                      goto fail;
> -                } else if (c == 'M') {
> -                    if (val < 0) {
> -                        monitor_printf(mon, "enter a positive value\n");
> -                        goto fail;
> -                    }
> -                    val <<= 20;
>                  }
>                  qdict_put_int(qdict, key, val);
>              }
> -- 
> 2.7.5
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
diff mbox

Patch

diff --git a/monitor.c b/monitor.c
index 8b54ba1..3b2757e 100644
--- a/monitor.c
+++ b/monitor.c
@@ -101,8 +101,6 @@ 
  * TYPEs that put an int64_t value with key NAME:
  * 'l'    Argument is an expression (QEMU pocket calculator).
  * 'i'    Like 'l' except value must fit into 32 bit unsigned.
- * 'M'    Like 'l' except value must not be negative and is multiplied
- *        by 2^20 (think "mebibyte").
  *
  * TYPEs that put an uint64_t value with key NAME:
  * 'o'    Argument is a size (think "octets").  Without suffix the
@@ -134,7 +132,7 @@ 
  * '?'    Argument is optional, nothing is put when it is absent
  *        (all types except 'O', '/', 'b').
  * '.'    Argument is optional, must be preceded by '.' if present
- *        (only types 'i', 'l', 'M')
+ *        (only types 'i', 'l')
  */
 
 typedef struct mon_cmd_t {
@@ -2913,7 +2911,6 @@  static QDict *monitor_parse_arguments(Monitor *mon,
             break;
         case 'i':
         case 'l':
-        case 'M':
             {
                 int64_t val;
 
@@ -2944,12 +2941,6 @@  static QDict *monitor_parse_arguments(Monitor *mon,
                     monitor_printf(mon, "\'%s\' has failed: ", cmd->name);
                     monitor_printf(mon, "integer is for 32-bit values\n");
                     goto fail;
-                } else if (c == 'M') {
-                    if (val < 0) {
-                        monitor_printf(mon, "enter a positive value\n");
-                        goto fail;
-                    }
-                    val <<= 20;
                 }
                 qdict_put_int(qdict, key, val);
             }