From: "Ahmed Kamal" <email.ahmedkamal@googlemail.com>
To: linux-btrfs@vger.kernel.org
Subject: Fix: btrfsctl arguments handling
Date: Fri, 18 Jul 2008 19:37:48 +0300 [thread overview]
Message-ID: <3da3b5b40807180937md87cb4aj965b1b3a52ae7358@mail.gmail.com> (raw)
Hi,
btrfsctl -A
in the current -unstable branch, does not result in the error message
designated for it, namely "-A requires an arg\n". Turns out the whole
loop was being skipped!
Please find a patch attached that fixed it for me.
diff -r 1aa4b32e3efd btrfsctl.c
--- a/btrfsctl.c Tue Jun 10 10:09:18 2008 -0400
+++ b/btrfsctl.c Fri Jul 18 22:34:46 2008 +0300
@@ -73,7 +73,7 @@
btrfs_scan_one_dir("/dev", 1);
exit(0);
}
- for (i = 1; i < ac - 1; i++) {
+ for (i = 1; i <= ac - 1; i++) {
if (strcmp(av[i], "-s") == 0) {
if (i + 1 >= ac - 1) {
fprintf(stderr, "-s requires an arg");
PS: Is this the correct way to submit patches ?
next reply other threads:[~2008-07-18 16:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-18 16:37 Ahmed Kamal [this message]
2008-07-18 16:44 ` Fix: btrfsctl arguments handling Ahmed Kamal
2008-07-27 19:02 ` Ahmed Kamal
2008-07-29 15:17 ` Chris Mason
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=3da3b5b40807180937md87cb4aj965b1b3a52ae7358@mail.gmail.com \
--to=email.ahmedkamal@googlemail.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