diff mbox series

casefold: Fix expansion of seqres variable

Message ID 20220511002520.352812-1-krisman@collabora.com (mailing list archive)
State New, archived
Headers show
Series casefold: Fix expansion of seqres variable | expand

Commit Message

Gabriel Krisman Bertazi May 11, 2022, 12:25 a.m. UTC
seqres is not properly expanded on these error paths, causing a file
called seqres.full to be created instead.

Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
---
 common/casefold | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Dave Chinner May 11, 2022, 4:55 a.m. UTC | #1
On Tue, May 10, 2022 at 08:25:20PM -0400, Gabriel Krisman Bertazi wrote:
> seqres is not properly expanded on these error paths, causing a file
> called seqres.full to be created instead.
> 
> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
> ---
>  common/casefold | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/common/casefold b/common/casefold
> index 9172d818125a..7e8f941211db 100644
> --- a/common/casefold
> +++ b/common/casefold
> @@ -25,7 +25,7 @@ _require_scratch_casefold()
>  		_notrun "$FSTYP does not support casefold feature"
>  	fi
>  
> -	if ! _scratch_mkfs_casefold &>>seqres.full; then
> +	if ! _scratch_mkfs_casefold &>>$seqres.full; then

PLease add a space between the &>> and $seqres.full while you are
fixing this. It's unreadable without proper whitespace separation...

Cheers,

Dave.
Zorro Lang May 11, 2022, 9:26 a.m. UTC | #2
On Wed, May 11, 2022 at 02:55:37PM +1000, Dave Chinner wrote:
> On Tue, May 10, 2022 at 08:25:20PM -0400, Gabriel Krisman Bertazi wrote:
> > seqres is not properly expanded on these error paths, causing a file
> > called seqres.full to be created instead.
> > 
> > Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
> > ---
> >  common/casefold | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/common/casefold b/common/casefold
> > index 9172d818125a..7e8f941211db 100644
> > --- a/common/casefold
> > +++ b/common/casefold
> > @@ -25,7 +25,7 @@ _require_scratch_casefold()
> >  		_notrun "$FSTYP does not support casefold feature"
> >  	fi
> >  
> > -	if ! _scratch_mkfs_casefold &>>seqres.full; then
> > +	if ! _scratch_mkfs_casefold &>>$seqres.full; then

By running `grep -rsn seqres|grep -v \$seqres`, I think this's only one file
we missed '$' for 'seqres'. So this fix is good to me. And...

> 
> PLease add a space between the &>> and $seqres.full while you are
> fixing this. It's unreadable without proper whitespace separation...

I'll merge your V2 patch, after you change it as Dave suggested above.

Thanks,
Zorro

> 
> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> david@fromorbit.com
>
diff mbox series

Patch

diff --git a/common/casefold b/common/casefold
index 9172d818125a..7e8f941211db 100644
--- a/common/casefold
+++ b/common/casefold
@@ -25,7 +25,7 @@  _require_scratch_casefold()
 		_notrun "$FSTYP does not support casefold feature"
 	fi
 
-	if ! _scratch_mkfs_casefold &>>seqres.full; then
+	if ! _scratch_mkfs_casefold &>>$seqres.full; then
 		_notrun "$FSTYP userspace tools do not support casefold"
 	fi
 
@@ -33,7 +33,7 @@  _require_scratch_casefold()
 	# defined by the userspace tools.  This will fail if
 	# the userspace tool used a more recent encoding than the one
 	# supported in kernel space.
-	if ! _try_scratch_mount &>>seqres.full; then
+	if ! _try_scratch_mount &>>$seqres.full; then
 		_notrun "kernel can't mount filesystem with the encoding set by userspace"
 	fi
 	_scratch_unmount