diff mbox series

[v2] casefold: Fix expansion of seqres variable

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

Commit Message

Gabriel Krisman Bertazi May 11, 2022, 4:33 p.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>

---
changes since v1:
  - Add whitespace between variable and std redirection (chinner)
---
 common/casefold | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Zorro Lang May 11, 2022, 4:43 p.m. UTC | #1
On Wed, May 11, 2022 at 12:33:40PM -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>
> 
> ---

Reviewed-by: Zorro Lang <zlang@redhat.com>

> changes since v1:
>   - Add whitespace between variable and std redirection (chinner)
> ---
>  common/casefold | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/common/casefold b/common/casefold
> index 9172d818125a..d9126f4c59e6 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
> -- 
> 2.36.1
>
diff mbox series

Patch

diff --git a/common/casefold b/common/casefold
index 9172d818125a..d9126f4c59e6 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