xfs_repair: fix incorrect return value in namecheck()
PATCH 1/1 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 <[email protected]>
Signed-off-by Eric Sandeen <[email protected]>
---
repair/da_util.c +1 -1
@@ -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 ; }
Quoted 7 lines · Eric Sandeen
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 <[email protected]>Signed-off-by Eric Sandeen <[email protected]>
Looks ok,
Reviewed-by Darrick J. Wong <[email protected]>
(Sez me who complained about this weeks ago on IRC and then RVBd the broken version so who knows where my brain went lunchtime lol...)
--D
Quoted 16 lines
---
repair/da_util.c +1
-1@@ -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 ; }
Quoted 8 lines · Eric Sandeen
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 <[email protected]>Signed-off-by Eric Sandeen <[email protected]>---
Makes sense.
Reviewed-by Bill O'Donnell <[email protected]>
Quoted 15 lines
repair/da_util.c +1
-1@@ -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 ; }