提交 ee9545da 编写于 作者: M Markus Armbruster 提交者: Aurelien Jarno

monitor: Rename argument type 'b' to 'f'

To make 'b' available for boolean argument.
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
上级 ae82d324
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
* 'l' target long (32 or 64 bit) * 'l' target long (32 or 64 bit)
* 'M' just like 'l', except in user mode the value is * 'M' just like 'l', except in user mode the value is
* multiplied by 2^20 (think Mebibyte) * multiplied by 2^20 (think Mebibyte)
* 'b' double * 'f' double
* user mode accepts an optional G, g, M, m, K, k suffix, * user mode accepts an optional G, g, M, m, K, k suffix,
* which multiplies the value by 2^30 for suffixes G and * which multiplies the value by 2^30 for suffixes G and
* g, 2^20 for M and m, 2^10 for K and k * g, 2^20 for M and m, 2^10 for K and k
...@@ -3714,7 +3714,7 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon, ...@@ -3714,7 +3714,7 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
qdict_put(qdict, key, qint_from_int(val)); qdict_put(qdict, key, qint_from_int(val));
} }
break; break;
case 'b': case 'f':
case 'T': case 'T':
{ {
double val; double val;
...@@ -3730,7 +3730,7 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon, ...@@ -3730,7 +3730,7 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
if (get_double(mon, &val, &p) < 0) { if (get_double(mon, &val, &p) < 0) {
goto fail; goto fail;
} }
if (c == 'b' && *p) { if (c == 'f' && *p) {
switch (*p) { switch (*p) {
case 'K': case 'k': case 'K': case 'k':
val *= 1 << 10; p++; break; val *= 1 << 10; p++; break;
...@@ -4231,7 +4231,7 @@ static int check_arg(const CmdArgs *cmd_args, QDict *args) ...@@ -4231,7 +4231,7 @@ static int check_arg(const CmdArgs *cmd_args, QDict *args)
return -1; return -1;
} }
break; break;
case 'b': case 'f':
case 'T': case 'T':
if (qobject_type(value) != QTYPE_QINT && qobject_type(value) != QTYPE_QFLOAT) { if (qobject_type(value) != QTYPE_QINT && qobject_type(value) != QTYPE_QFLOAT) {
qerror_report(QERR_INVALID_PARAMETER_TYPE, name, "number"); qerror_report(QERR_INVALID_PARAMETER_TYPE, name, "number");
......
...@@ -804,7 +804,7 @@ ETEXI ...@@ -804,7 +804,7 @@ ETEXI
{ {
.name = "migrate_set_speed", .name = "migrate_set_speed",
.args_type = "value:b", .args_type = "value:f",
.params = "value", .params = "value",
.help = "set maximum speed (in bytes) for migrations", .help = "set maximum speed (in bytes) for migrations",
.user_print = monitor_user_noop, .user_print = monitor_user_noop,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册