From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54140 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P4941-00040j-4C for qemu-devel@nongnu.org; Fri, 08 Oct 2010 05:16:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P493z-0000LM-On for qemu-devel@nongnu.org; Fri, 08 Oct 2010 05:16:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P493z-0000LG-IU for qemu-devel@nongnu.org; Fri, 08 Oct 2010 05:16:27 -0400 From: Jes.Sorensen@redhat.com Date: Fri, 8 Oct 2010 11:16:00 +0200 Message-Id: <1286529360-5715-8-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: <1286529360-5715-1-git-send-email-Jes.Sorensen@redhat.com> References: <1286529360-5715-1-git-send-email-Jes.Sorensen@redhat.com> Subject: [Qemu-devel] [PATCH 7/7] Remove obsolete 'f' double parameter type List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, armbru@redhat.com From: Jes Sorensen '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 --- monitor.c | 18 +----------------- 1 files changed, 1 insertions(+), 17 deletions(-) diff --git a/monitor.c b/monitor.c index 6dd1926..6678fb5 100644 --- a/monitor.c +++ b/monitor.c @@ -83,10 +83,6 @@ * suffix, which multiplies the value by 2^40 for * suffixes T and t, 2^30 for suffixes G and g, 2^20 for * 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 * user mode accepts an optional ms, us, ns suffix, * which divides the value by 1e3, 1e6, 1e9, respectively @@ -3726,7 +3722,6 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon, p = end; } break; - case 'f': case 'T': { double val; @@ -3742,17 +3737,7 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon, if (get_double(mon, &val, &p) < 0) { goto fail; } - if (c == 'f' && *p) { - 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') { + if (p[0] && p[1] == 's') { switch (*p) { case 'm': val /= 1e3; p += 2; break; @@ -4230,7 +4215,6 @@ static int check_client_args_type(const QDict *client_args, return -1; } break; - case 'f': case 'T': if (qobject_type(client_arg) != QTYPE_QINT && qobject_type(client_arg) != QTYPE_QFLOAT) { -- 1.7.2.3