linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH-e2fsprogs] filefrag: accept positive ioctl return value
@ 2009-06-02 12:12 Peng Tao
  2009-06-02 12:40 ` Theodore Tso
  2009-06-02 12:59 ` Theodore Tso
  0 siblings, 2 replies; 4+ messages in thread
From: Peng Tao @ 2009-06-02 12:12 UTC (permalink / raw)
  To: linux-ext4; +Cc: tytso, Peng Tao

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-06-02 17:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-02 12:12 [PATCH-e2fsprogs] filefrag: accept positive ioctl return value Peng Tao
2009-06-02 12:40 ` Theodore Tso
2009-06-02 17:10   ` Peng Tao
2009-06-02 12:59 ` Theodore Tso

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).