Re: [PATCH] Fix bashism in fsck.btrfs for debian/ubuntu dash.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 15, 2015 at 09:28:29PM +0100, Dimitri John Ledkov wrote:
> Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784911
> Signed-off-by: Dimitri John Ledkov <dimitri.j.ledkov@xxxxxxxxx>
> ---
>  fsck.btrfs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fsck.btrfs b/fsck.btrfs
> index f056a7f..3a92804 100755
> --- a/fsck.btrfs
> +++ b/fsck.btrfs
> @@ -31,7 +31,7 @@ if [ ! -e $DEV ]; then
>  	echo "$0: $DEV does not exist"
>  	exit 8
>  fi
> -if [ "$AUTO" == "false" ]; then
> +if [ "false" = "$AUTO" ]; then
>  	echo "If you wish to check the consistency of a BTRFS filesystem or"
>  	echo "repair a damaged filesystem, see btrfs(8) subcommand 'check'."
>  fi

I'm going to completely bikeshed here, but Yoda conditions are already
ugly in C, and completely pointless in Bash, where you can't ever
accidentally reassign a variable in a condition. Either way, I think:

if [ ! $AUTO ]; then

would be clearer anyways.

Thanks!
-- 
Omar
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux