From patchwork Sat Oct 13 19:27:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Goffredo Baroncelli X-Patchwork-Id: 1589291 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B152040D51 for ; Sat, 13 Oct 2012 19:27:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754056Ab2JMT1H (ORCPT ); Sat, 13 Oct 2012 15:27:07 -0400 Received: from mail-ee0-f46.google.com ([74.125.83.46]:38094 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754051Ab2JMT1E (ORCPT ); Sat, 13 Oct 2012 15:27:04 -0400 Received: by mail-ee0-f46.google.com with SMTP id b15so2406776eek.19 for ; Sat, 13 Oct 2012 12:27:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=To5FBJMysPjQjX/aMakvJB7CVQ4u35+AgJdTwVO5m4U=; b=SFY2qE7/1agcXQiHDQWtSkXnxey7xFLI4w5gOOxTv8Be3YVqQLp2ogkEGz9W3QrOzS qRH7ha9IRZDfNaYbcJtqJYXiHa9KiKsowCWlY2+wlfKhMhO5h6e+MsonYDqzjZqMsxDo iQD4rG2EokmaVjfZnegCGBGhA2ymlskJJD7PfQ9qOTQ0Z8ZfSEEooclYJKi4ptoMEHS/ atVk8rI6bfIDxOXcYVLQKTT9SBP+G67Zj3aDnv0mvap/lDmmv5g1q2lOd1u8lRR0Fjub v0Ie1FhH+bHr0BF6Ms469mXJ3jYa+vubrMpWgJQNDqF9+/ELKGLowUNcwrJLgWVYrIu8 a0UQ== Received: by 10.14.214.133 with SMTP id c5mr10692601eep.8.1350156423003; Sat, 13 Oct 2012 12:27:03 -0700 (PDT) Received: from venice..bhome (host103-133-static.242-95-b.business.telecomitalia.it. [95.242.133.103]) by mx.google.com with ESMTPS id x42sm17352279eel.11.2012.10.13.12.27.01 (version=SSLv3 cipher=OTHER); Sat, 13 Oct 2012 12:27:02 -0700 (PDT) From: Goffredo Baroncelli To: kreijack@gmail.com Cc: Hugo Mills , Chris Mason , linux-btrfs@vger.kernel.org, David Sterba , Martin Steigerwald , Goffredo Baroncelli Subject: [PATCH 2/3] Deleted the byte prefix with pretty_sizes(). Date: Sat, 13 Oct 2012 21:27:15 +0200 Message-Id: <1350156436-14439-3-git-send-email-kreijack@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1350156436-14439-1-git-send-email-kreijack@gmail.com> References: <1350156436-14439-1-git-send-email-kreijack@gmail.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org From: Goffredo Baroncelli When the function pretty_sizes() is used, the word "bytes" must avoided. --- cmds-filesystem.c | 2 +- cmds-scrub.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmds-filesystem.c b/cmds-filesystem.c index 9c43d35..21cdd7f 100644 --- a/cmds-filesystem.c +++ b/cmds-filesystem.c @@ -202,7 +202,7 @@ static void print_one_uuid(struct btrfs_fs_devices *fs_devices) super_bytes_used = pretty_sizes(device->super_bytes_used); total = device->total_devs; - printf(" uuid: %s\n\tTotal devices %llu FS bytes used %s\n", uuidbuf, + printf(" uuid: %s\n\tTotal devices %llu FS space used %s\n", uuidbuf, (unsigned long long)total, super_bytes_used); free(super_bytes_used); diff --git a/cmds-scrub.c b/cmds-scrub.c index 24be20f..69dfa7e 100644 --- a/cmds-scrub.c +++ b/cmds-scrub.c @@ -125,7 +125,7 @@ static void print_scrub_summary(struct btrfs_scrub_progress *p) { u64 err_cnt; u64 err_cnt2; - char *bytes; + char *total; err_cnt = p->read_errors + p->csum_errors + @@ -137,10 +137,10 @@ static void print_scrub_summary(struct btrfs_scrub_progress *p) if (p->malloc_errors) printf("*** WARNING: memory allocation failed while scrubbing. " "results may be inaccurate\n"); - bytes = pretty_sizes(p->data_bytes_scrubbed + p->tree_bytes_scrubbed); - printf("\ttotal bytes scrubbed: %s with %llu errors\n", bytes, + total = pretty_sizes(p->data_bytes_scrubbed + p->tree_bytes_scrubbed); + printf("\ttotal scrubbed: %s with %llu errors\n", total, max(err_cnt, err_cnt2)); - free(bytes); + free(total); if (err_cnt || err_cnt2) { printf("\terror details:"); PRINT_SCRUB_ERROR(p->read_errors, "read");