From: Eric Sandeen Date: Fri, 1 Feb 2019 17:54:15 +0000 (-0600) Subject: xfs_repair: fix incorrect return value in namecheck() X-Git-Tag: v4.20.0-rc1~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2cd8d66522b1ba9dc21f47e3588d4ab037be37c7;p=thirdparty%2Fxfsprogs-dev.git 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 --- 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; }