From patchwork Wed Oct 13 08:48:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jes Sorensen X-Patchwork-Id: 67676 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7DC25B70DD for ; Wed, 13 Oct 2010 23:39:07 +1100 (EST) Received: from localhost ([127.0.0.1]:57782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P60bS-0004gp-Pv for incoming@patchwork.ozlabs.org; Wed, 13 Oct 2010 08:38:42 -0400 Received: from [140.186.70.92] (port=34521 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P602B-0006bb-Ke for qemu-devel@nongnu.org; Wed, 13 Oct 2010 08:02:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P5x1C-0004wz-C5 for qemu-devel@nongnu.org; Wed, 13 Oct 2010 04:49:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P5x1C-0004wv-5Y for qemu-devel@nongnu.org; Wed, 13 Oct 2010 04:49:02 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9D8mxkf020530 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 13 Oct 2010 04:48:59 -0400 Received: from localhost6.localdomain6 (ovpn-113-72.phx2.redhat.com [10.3.113.72]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id o9D8mqsQ023950; Wed, 13 Oct 2010 04:48:58 -0400 From: Jes.Sorensen@redhat.com To: qemu-devel@nongnu.org Date: Wed, 13 Oct 2010 10:48:50 +0200 Message-Id: <1286959730-924-5-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: <1286959730-924-1-git-send-email-Jes.Sorensen@redhat.com> References: <1286959730-924-1-git-send-email-Jes.Sorensen@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: pbonzini@redhat.com, armbru@redhat.com Subject: [Qemu-devel] [PATCH 4/4] Remove obsolete 'f' double parameter type X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 b0ea5a3..078a66e 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 @@ -3727,7 +3723,6 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon, p = end; } break; - case 'f': case 'T': { double val; @@ -3743,17 +3738,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; @@ -4231,7 +4216,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) {