diff mbox series

xfs_scrub: fix reporting of EINVAL for online repairs

Message ID 20200227202320.GN8045@magnolia (mailing list archive)
State Accepted
Headers show
Series xfs_scrub: fix reporting of EINVAL for online repairs | expand

Commit Message

Darrick J. Wong Feb. 27, 2020, 8:23 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

The arguments to str_corrupt() are in the wrong order.  Fix that.

Fixes: de5d20ece73f579 ("libfrog: convert scrub.c functions to negative error codes")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 scrub/scrub.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Eric Sandeen Feb. 27, 2020, 8:28 p.m. UTC | #1
On 2/27/20 12:23 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> The arguments to str_corrupt() are in the wrong order.  Fix that.
> 
> Fixes: de5d20ece73f579 ("libfrog: convert scrub.c functions to negative error codes")
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

thanks for the fixes: tag :)

Reviewed-by: Eric Sandeen <sandeen@redhat.com>
diff mbox series

Patch

diff --git a/scrub/scrub.c b/scrub/scrub.c
index f8fa6b7a..6e7f99a5 100644
--- a/scrub/scrub.c
+++ b/scrub/scrub.c
@@ -774,9 +774,8 @@  _("Filesystem is shut down, aborting."));
 		/* fall through */
 	case EINVAL:
 		/* Kernel doesn't know how to repair this? */
-		str_corrupt(ctx,
-_("%s: Don't know how to fix; offline repair required."),
-				descr_render(&dsc));
+		str_corrupt(ctx, descr_render(&dsc),
+_("Don't know how to fix; offline repair required."));
 		return CHECK_DONE;
 	case EROFS:
 		/* Read-only filesystem, can't fix. */