]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: fix XFS_WANT_CORRUPTED_* macros to return negative error codes
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 2 Sep 2015 22:41:48 +0000 (08:41 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 2 Sep 2015 22:41:48 +0000 (08:41 +1000)
Since the rest of libxfs returns negative error codes, these two sanity
checking macros ought to have the same applied.  While we're at it,
fix a couple more sign errors in the same file.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
libxfs/libxfs_priv.h

index 2a8b850737099b97b51eefad107388356906982c..22f2d538be94d77f9f0ef6754595d55933fb9bbe 100644 (file)
@@ -148,9 +148,9 @@ enum ce { CE_DEBUG, CE_CONT, CE_NOTE, CE_WARN, CE_ALERT, CE_PANIC };
 #define XFS_TRANS_UNRESERVE_QUOTA_NBLKS(mp,tp,ip,nblks,ninos,fl)       0
 #define XFS_TEST_ERROR(expr,a,b,c)     ( expr )
 #define XFS_WANT_CORRUPTED_GOTO(mp, expr, l)   \
-               { (mp) = (mp); if (!(expr)) { error = EFSCORRUPTED; goto l; } }
+               { (mp) = (mp); if (!(expr)) { error = -EFSCORRUPTED; goto l; } }
 #define XFS_WANT_CORRUPTED_RETURN(mp, expr)    \
-               { (mp) = (mp); if (!(expr)) { return EFSCORRUPTED; } }
+               { (mp) = (mp); if (!(expr)) { return -EFSCORRUPTED; } }
 
 #ifdef __GNUC__
 #define __return_address       __builtin_return_address(0)
@@ -417,8 +417,7 @@ do { \
 })
 
 #define xfs_rotorstep                          1
-#define xfs_bmap_rtalloc(a)                    (ENOSYS)
-#define xfs_rtpick_extent(mp,tp,len,p)         (ENOSYS)
+#define xfs_bmap_rtalloc(a)                    (-ENOSYS)
 #define xfs_get_extsz_hint(ip)                 (0)
 #define xfs_inode_is_filestream(ip)            (0)
 #define xfs_filestream_lookup_ag(ip)           (0)