Skip to contentSkip to conversation

xfs_scrub: fix reporting of EINVAL for online repairs

PATCH In review Darrick J. Wong 2 participants 2 messages Feb 27, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs_scrub: fix reporting of EINVAL for online repairs

From: Darrick J. Wong <[email protected]>

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

Fixes de5d20ece73f579 ("libfrog: convert scrub.c functions to negative error codes")
---
 scrub/scrub.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
scrub/scrub.c +2 -3
index f8fa6b7a..6e7f99a5 100644
@@ -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. */