From: Omar Sandoval <osandov@osandov.com>
To: Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Fix bashism in fsck.btrfs for debian/ubuntu dash.
Date: Fri, 15 May 2015 13:43:40 -0700 [thread overview]
Message-ID: <20150515204340.GA20386@mew.dhcp4.washington.edu> (raw)
In-Reply-To: <1431721709-5146-1-git-send-email-dimitri.j.ledkov@intel.com>
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@intel.com>
> ---
> 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
next prev parent reply other threads:[~2015-05-15 20:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 20:28 [PATCH] Fix bashism in fsck.btrfs for debian/ubuntu dash Dimitri John Ledkov
2015-05-15 20:43 ` Omar Sandoval [this message]
2015-05-16 8:27 ` Florian Gamböck
2015-05-16 8:58 ` Omar Sandoval
2015-05-20 16:49 ` David Sterba
2015-05-16 9:14 ` Markus Baertschi
2015-05-21 8:19 ` Dimitri John Ledkov
2015-05-21 11:56 ` David Sterba
2015-05-21 12:50 ` [PATCH] fsck.btrfs: Fix bashism and bad getopts processing Dimitri John Ledkov
2015-05-21 14:40 ` David Sterba
2015-05-25 12:28 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150515204340.GA20386@mew.dhcp4.washington.edu \
--to=osandov@osandov.com \
--cc=dimitri.j.ledkov@intel.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox