From patchwork Wed Jul 10 17:40:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 2825841 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E0452C0AB2 for ; Wed, 10 Jul 2013 17:40:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0008220171 for ; Wed, 10 Jul 2013 17:40:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 92E192016D for ; Wed, 10 Jul 2013 17:40:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754735Ab3GJRkP (ORCPT ); Wed, 10 Jul 2013 13:40:15 -0400 Received: from cantor2.suse.de ([195.135.220.15]:40314 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754524Ab3GJRkO (ORCPT ); Wed, 10 Jul 2013 13:40:14 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 85701A0FED; Wed, 10 Jul 2013 19:40:13 +0200 (CEST) Received: by ds.suse.cz (Postfix, from userid 10065) id 472EFDA7A3; Wed, 10 Jul 2013 19:40:13 +0200 (CEST) From: David Sterba To: linux-btrfs@vger.kernel.org Cc: hugo@carfax.org.uk, David Sterba Subject: [PATCH] btrfs-progs: use IEC units for sizes Date: Wed, 10 Jul 2013 19:40:12 +0200 Message-Id: <1373478012-7247-1-git-send-email-dsterba@suse.cz> X-Mailer: git-send-email 1.8.2 In-Reply-To: <20130710161623.GJ5445@carfax.org.uk> References: <20130710161623.GJ5445@carfax.org.uk> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As implemented now, we use 1024 based units but reporting 1000 based, let's finally fix that and add optional unit bases later. Signed-off-by: David Sterba --- utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils.c b/utils.c index bce06f1..2e24cb0 100644 --- a/utils.c +++ b/utils.c @@ -1173,8 +1173,7 @@ out: return ret; } -static char *size_strs[] = { "", "KB", "MB", "GB", "TB", - "PB", "EB"}; +static char *size_strs[] = { "", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"}; void pretty_size_snprintf(u64 size, char *str, size_t str_bytes) { int num_divs = 0;