Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Zhao Lei <zhaolei@cn.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Cc: Zhao Lei <zhaolei@cn.fujitsu.com>
Subject: [PATCH v2 0/4] btrfs-progs: Use common function to parse unit arguments
Date: Mon, 31 Aug 2015 19:03:40 +0800	[thread overview]
Message-ID: <cover.1441018814.git.zhaolei@cn.fujitsu.com> (raw)

We are using separate code for parse unit mode in current code,
better to use common function.

This patchset introduce common function to parse arguments for setting
unit: get_unit_mode_from_arg()
and common help message for unit argument, to make every tool in btrfs having
same interface for setting unit.

The merit are:
1: Unify current each tool's arguments for unit
2: Make tools in future easy to implement such argument
3: Changes(enhancement) in common function have effect on all
   relative tools

Changelog v1->v2:
 Keep short options for 'fi df' command, to keeps option compatibility
 with the standalone 'df' commmand, suggested-by:
 David Sterba <dsterba@suse.cz>

Zhao Lei (4):
  btrfs-progs: Introduce get_unit_mode_from_arg for common use
  btrfs-progs: Use common unit parser for btrfs filesystem command
  btrfs-progs: Use common unit parser for btrfs device command
  btrfs-progs: Use common unit parser for btrfs qgroup command

 cmds-device.c     |  74 ++++-----------------------------
 cmds-fi-usage.c   |  79 ++++-------------------------------
 cmds-filesystem.c | 121 ++++++------------------------------------------------
 cmds-qgroup.c     |  47 ++-------------------
 utils.c           | 102 +++++++++++++++++++++++++++++++++++++++++++++
 utils.h           |  24 +++++++++++
 6 files changed, 156 insertions(+), 291 deletions(-)

-- 
1.8.5.1


             reply	other threads:[~2015-08-31 11:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-31 11:03 Zhao Lei [this message]
2015-08-31 11:03 ` [PATCH v2 1/4] btrfs-progs: Introduce get_unit_mode_from_arg for common use Zhao Lei
2015-08-31 11:03 ` [PATCH v2 2/4] btrfs-progs: Use common unit parser for btrfs filesystem command Zhao Lei
2015-08-31 14:05   ` David Sterba
2015-08-31 11:03 ` [PATCH v2 3/4] btrfs-progs: Use common unit parser for btrfs device command Zhao Lei
2015-08-31 11:03 ` [PATCH v2 4/4] btrfs-progs: Use common unit parser for btrfs qgroup command Zhao Lei
2015-08-31 14:06 ` [PATCH v2 0/4] btrfs-progs: Use common function to parse unit arguments David Sterba

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=cover.1441018814.git.zhaolei@cn.fujitsu.com \
    --to=zhaolei@cn.fujitsu.com \
    --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