[Ocfs2-tools-devel] [PATCH 03/11] libocfs2: ocfs2_read_blocks() should return an errcode_t.

Joel Becker joel.becker at oracle.com
Fri May 22 18:00:18 PDT 2009


It was returning -EIO instead of OCFS2_ET_IO.

Signed-off-by: Joel Becker <joel.becker at oracle.com>
---
 libocfs2/openfs.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libocfs2/openfs.c b/libocfs2/openfs.c
index 538d859..f10d0e8 100644
--- a/libocfs2/openfs.c
+++ b/libocfs2/openfs.c
@@ -48,8 +48,8 @@
  * function. At this point this function returns EIO if image file has any
  * holes
  */
-inline errcode_t ocfs2_read_blocks(ocfs2_filesys *fs, int64_t blkno,
-		int count, char *data)
+errcode_t ocfs2_read_blocks(ocfs2_filesys *fs, int64_t blkno,
+			    int count, char *data)
 {
 	int i;
 
@@ -62,7 +62,7 @@ inline errcode_t ocfs2_read_blocks(ocfs2_filesys *fs, int64_t blkno,
 		 */
 		for (i = 0; i < count; i++)
 			if (!ocfs2_image_test_bit(fs, blkno+i))
-				return -EIO;
+				return OCFS2_ET_IO;
 		/* translate the block number */
 		blkno = ocfs2_image_get_blockno(fs, blkno);
 	}
-- 
1.6.3




More information about the Ocfs2-tools-devel mailing list