mirror of https://github.com/xemu-project/xemu.git
Remove obsolete 'f' double parameter type
'f' double is no longer used, and we should be using floating point variables to store byte sizes. Remove it. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
ed3d4a8075
commit
07de3e60b0
18
monitor.c
18
monitor.c
|
@ -83,10 +83,6 @@
|
||||||
* suffix, which multiplies the value by 2^40 for
|
* suffix, which multiplies the value by 2^40 for
|
||||||
* suffixes T and t, 2^30 for suffixes G and g, 2^20 for
|
* suffixes T and t, 2^30 for suffixes G and g, 2^20 for
|
||||||
* M and m, 2^10 for K and k
|
* M and m, 2^10 for K and k
|
||||||
* '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
|
|
||||||
* 'T' double
|
* 'T' double
|
||||||
* user mode accepts an optional ms, us, ns suffix,
|
* user mode accepts an optional ms, us, ns suffix,
|
||||||
* which divides the value by 1e3, 1e6, 1e9, respectively
|
* which divides the value by 1e3, 1e6, 1e9, respectively
|
||||||
|
@ -3731,7 +3727,6 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
|
||||||
p = end;
|
p = end;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'f':
|
|
||||||
case 'T':
|
case 'T':
|
||||||
{
|
{
|
||||||
double val;
|
double val;
|
||||||
|
@ -3747,17 +3742,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 == 'f' && *p) {
|
if (p[0] && p[1] == 's') {
|
||||||
switch (*p) {
|
|
||||||
case 'K': case 'k':
|
|
||||||
val *= 1 << 10; p++; break;
|
|
||||||
case 'M': case 'm':
|
|
||||||
val *= 1 << 20; p++; break;
|
|
||||||
case 'G': case 'g':
|
|
||||||
val *= 1 << 30; p++; break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (c == 'T' && p[0] && p[1] == 's') {
|
|
||||||
switch (*p) {
|
switch (*p) {
|
||||||
case 'm':
|
case 'm':
|
||||||
val /= 1e3; p += 2; break;
|
val /= 1e3; p += 2; break;
|
||||||
|
@ -4240,7 +4225,6 @@ static int check_client_args_type(const QDict *client_args,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'f':
|
|
||||||
case 'T':
|
case 'T':
|
||||||
if (qobject_type(client_arg) != QTYPE_QINT &&
|
if (qobject_type(client_arg) != QTYPE_QINT &&
|
||||||
qobject_type(client_arg) != QTYPE_QFLOAT) {
|
qobject_type(client_arg) != QTYPE_QFLOAT) {
|
||||||
|
|
Loading…
Reference in New Issue