linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nils Steinger <nst@voidptr.de>
To: linux-btrfs@vger.kernel.org
Cc: Nils Steinger <nst@voidptr.de>
Subject: [PATCH] Options to set fixed unit for `filesystem df`
Date: Thu, 14 Aug 2014 21:24:20 +0200	[thread overview]
Message-ID: <1408044261-11234-1-git-send-email-nst@voidptr.de> (raw)

Currently, `btrfs filesystem df` uses the pretty_size() function, which
automatically selects a unit to display a size in, e.g. 1024 bytes will be
displayed as "1.00KiB".
This makes parsing the output of `filesystem df` unnecessarily hard, so I've
added the options -b, -k, -m, and -g to get the output in bytes, kibi-, mebi-,
and gibibytes respectively.

Nils Steinger (1):
  Add options to use a fixed unit for `filesystem df` instead of
    determining it automatically.

 cmds-filesystem.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++-------
 utils.c           | 30 +++++++++++++++++++++++++++
 utils.h           |  8 +++++++
 3 files changed, 93 insertions(+), 7 deletions(-)

-- 
1.9.1


             reply	other threads:[~2014-08-14 19:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-14 19:24 Nils Steinger [this message]
2014-08-14 19:24 ` [PATCH] Add options to use a fixed unit for `filesystem df` instead of determining it automatically Nils Steinger
2014-08-14 21:13 ` [PATCH v2] Options to set fixed unit for `filesystem df` Nils Steinger
2014-08-14 21:13   ` [PATCH v2] Add options to use a fixed unit for `filesystem df` instead of determining it automatically Nils Steinger

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=1408044261-11234-1-git-send-email-nst@voidptr.de \
    --to=nst@voidptr.de \
    --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).