From: Goffredo Baroncelli <kreijack@gmail.com>
To: kreijack@gmail.com
Cc: Hugo Mills <hugo@carfax.org.uk>,
Chris Mason <chris.mason@fusionio.com>,
linux-btrfs@vger.kernel.org, David Sterba <dave@jikos.cz>,
Martin Steigerwald <Martin@lichtvoll.de>,
Goffredo Baroncelli <kreijack@inwind.it>
Subject: [PATCH 2/3] Deleted the byte prefix with pretty_sizes().
Date: Sat, 13 Oct 2012 21:27:15 +0200 [thread overview]
Message-ID: <1350156436-14439-3-git-send-email-kreijack@gmail.com> (raw)
In-Reply-To: <1350156436-14439-1-git-send-email-kreijack@gmail.com>
From: Goffredo Baroncelli <kreijack@inwind.it>
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");
--
1.7.10.4
next prev parent reply other threads:[~2012-10-13 19:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-13 19:27 [PATCH][V1][BTRFS-PROGS] Replace the units from KB to KiB Goffredo Baroncelli
2012-10-13 19:27 ` [PATCH 1/3] Add support for different unit Goffredo Baroncelli
2012-10-15 11:47 ` Martin Steigerwald
2012-10-13 19:27 ` Goffredo Baroncelli [this message]
2012-10-13 19:27 ` [PATCH 3/3] Document the use of BTRFS_UNIT in man page Goffredo Baroncelli
2012-10-15 11:58 ` [PATCH][V1][BTRFS-PROGS] Replace the units from KB to KiB Martin Steigerwald
2012-10-15 17:02 ` Goffredo Baroncelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1350156436-14439-3-git-send-email-kreijack@gmail.com \
--to=kreijack@gmail.com \
--cc=Martin@lichtvoll.de \
--cc=chris.mason@fusionio.com \
--cc=dave@jikos.cz \
--cc=hugo@carfax.org.uk \
--cc=kreijack@inwind.it \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).