From 2cd8d66522b1ba9dc21f47e3588d4ab037be37c7 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Fri, 1 Feb 2019 11:54:15 -0600 Subject: [PATCH] xfs_repair: fix incorrect return value in namecheck() Obviously a directory entry with a '/' in the name should return 1, i.e. failure. This was just a dumb thinko. Fixes: 45571fd5885d ("xfs_repair: allow '/' in attribute names") Reported-by: Darrick J. Wong Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Reviewed-by: Bill O'Donnell Signed-off-by: Eric Sandeen --- repair/da_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repair/da_util.c b/repair/da_util.c index c5e690c30..4a258e584 100644 --- a/repair/da_util.c +++ b/repair/da_util.c @@ -31,7 +31,7 @@ namecheck( for (c = name, i = 0; i < length; i++, c++) { if (isadir && *c == '/') - return 0; + return 1; if (*c == '\0') return 1; } -- 2.47.2