Received: from [140.186.70.92] (port=43452 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0X7B-0001xd-Hq for qemu-devel@nongnu.org; Tue, 28 Sep 2010 06:08:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P0X7A-0001re-5U for qemu-devel@nongnu.org; Tue, 28 Sep 2010 06:08:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30658) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0X79-0001rY-Tx for qemu-devel@nongnu.org; Tue, 28 Sep 2010 06:08:48 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8SA8lcl028014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 28 Sep 2010 06:08:47 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH 5/5] Remove obsolete 'f' double parameter type References: <1284648749-18479-1-git-send-email-Jes.Sorensen@redhat.com> <1284648749-18479-6-git-send-email-Jes.Sorensen@redhat.com> Date: Tue, 28 Sep 2010 12:08:46 +0200 In-Reply-To: <1284648749-18479-6-git-send-email-Jes.Sorensen@redhat.com> (Jes Sorensen's message of "Thu, 16 Sep 2010 16:52:29 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jes.Sorensen@redhat.com Cc: pbonzini@redhat.com, qemu-devel@nongnu.org Jes.Sorensen@redhat.com writes: > 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 | 17 +---------------- > 1 files changed, 1 insertions(+), 16 deletions(-) > > diff --git a/monitor.c b/monitor.c > index 3630061..ffeb4ee 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 > @@ -3621,7 +3617,6 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon, > p = end; > } > break; > - case 'f': > case 'T': > { > double val; > @@ -3637,17 +3632,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; You missed check_client_args_type(). Yes, the monitor code sucks rocks.