linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peng Tao <bergwolf@gmail.com>
To: linux-ext4@vger.kernel.org
Cc: tytso@mit.edu, Peng Tao <bergwolf@gmail.com>
Subject: [PATCH-e2fsprogs] filefrag: accept positive ioctl return value
Date: Tue,  2 Jun 2009 20:12:41 +0800	[thread overview]
Message-ID: <1243944761-18673-1-git-send-email-bergwolf@gmail.com> (raw)

Some ioctl() returns non-negative value on success. filefrag_fiemap should
treat positive ioctl() return values as success.
This can be triggered by running filefrag on btrfs partitions.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
---
 misc/filefrag.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/misc/filefrag.c b/misc/filefrag.c
index 80ac05c..3dc966a 100644
--- a/misc/filefrag.c
+++ b/misc/filefrag.c
@@ -208,7 +208,7 @@ int filefrag_fiemap(int fd, int blk_shift, int *num_extents)
 				fiemap_incompat_printed = 1;
 			}
 		}
-		if (rc)
+		if (rc < 0)
 			return rc;
 
 		if (!verbose) {
-- 
1.6.2.GIT


             reply	other threads:[~2009-06-02 12:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-02 12:12 Peng Tao [this message]
2009-06-02 12:40 ` [PATCH-e2fsprogs] filefrag: accept positive ioctl return value Theodore Tso
2009-06-02 17:10   ` Peng Tao
2009-06-02 12:59 ` Theodore Tso

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=1243944761-18673-1-git-send-email-bergwolf@gmail.com \
    --to=bergwolf@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).