From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 4/7] btrfs-progs: add helpers to print ranges
Date: Tue, 13 Oct 2015 17:42:30 +0200 [thread overview]
Message-ID: <92b7e8c34b35527a86ada1ac0f321cd05ab63d82.1444750808.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1444750808.git.dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
---
cmds-balance.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/cmds-balance.c b/cmds-balance.c
index 72714b23b45c..dba6613b1540 100644
--- a/cmds-balance.c
+++ b/cmds-balance.c
@@ -190,6 +190,25 @@ static int parse_range_u32(const char *range, u32 *start, u32 *end)
return 0;
}
+__attribute__ ((unused))
+static void print_range(u64 start, u64 end)
+{
+ if (start)
+ printf("%llu", (unsigned long long)start);
+ printf("..");
+ if (end != (u64)-1)
+ printf("%llu", (unsigned long long)end);
+}
+
+static void print_range_u32(u32 start, u32 end)
+{
+ if (start)
+ printf("%u", start);
+ printf("..");
+ if (end != (u32)-1)
+ printf("%u", end);
+}
+
static int parse_filters(char *filters, struct btrfs_balance_args *args)
{
char *this_char;
--
2.6.1
next prev parent reply other threads:[~2015-10-13 15:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 15:42 [PATCH 0/7] Btrfs-progs, balance filters: stripes, limits David Sterba
2015-10-13 15:42 ` [PATCH 1/7] btrfs-progs: cleanup and comment parse_range David Sterba
2015-10-13 15:42 ` [PATCH 2/7] btrfs-progs: extend parse_range API to accept a relaxed range David Sterba
2015-10-13 15:42 ` [PATCH 3/7] btrfs-progs: add helpers for parsing 32bit ranges David Sterba
2015-10-13 15:42 ` David Sterba [this message]
2015-10-13 15:42 ` [PATCH 5/7] btrfs-progs: extend balance args to take min/max limit filter David Sterba
2015-10-13 15:42 ` [PATCH 6/7] btrfs-progs: balance: enhance the limit fiter with range David Sterba
2015-10-13 15:42 ` [PATCH 7/7] btrfs-progs: balance: add stripes filter 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=92b7e8c34b35527a86ada1ac0f321cd05ab63d82.1444750808.git.dsterba@suse.com \
--to=dsterba@suse.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;
as well as URLs for NNTP newsgroup(s).