From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50792 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5GFh-0006Xq-3D for qemu-devel@nongnu.org; Mon, 11 Oct 2010 07:09:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P5GFg-0003tm-4v for qemu-devel@nongnu.org; Mon, 11 Oct 2010 07:09:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P5GFf-0003tW-V4 for qemu-devel@nongnu.org; Mon, 11 Oct 2010 07:09:08 -0400 Message-ID: <4CB2F06C.50605@redhat.com> Date: Mon, 11 Oct 2010 13:09:32 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1286552914-27014-1-git-send-email-stefanha@linux.vnet.ibm.com> <1286552914-27014-3-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1286552914-27014-3-git-send-email-stefanha@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v2 2/7] cutils: Add bytes_to_str() to format byte values List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Anthony Liguori , Avi Kivity , qemu-devel@nongnu.org, Christoph Hellwig Am 08.10.2010 17:48, schrieb Stefan Hajnoczi: > From: Anthony Liguori > > This common function converts byte counts to human-readable strings with > proper units. > > Signed-off-by: Anthony Liguori > Signed-off-by: Stefan Hajnoczi I wonder how many similar implementations we have in the tree. I know at least of cvtstr() in cmd.c, which is used by qemu-io, but I would be surprised if it was the only one. Adding such a function to cutils.c sounds like a good idea, but we should probably try to change everything to use this common function. Kevin