diff mbox

[v2,1/2] xfstests: fix a typo in _require_block_device()

Message ID 196cc72cb39e1a338339fa09c73f6334af63a2d6.1424946979.git.zhaolei@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Zhaolei Feb. 26, 2015, 10:38 a.m. UTC
From: Zhao Lei <zhaolei@cn.fujitsu.com>

We need to check "$1" instead "$SCRATCH_DEV" in this function.

Changelog v1->v2:
 Use tab instead of space to fit new code style.
 Suggested by: Dave Chinner <david@fromorbit.com>

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
---
 common/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lukas Czerner Feb. 26, 2015, 10:45 a.m. UTC | #1
On Thu, 26 Feb 2015, Zhaolei wrote:

> Date: Thu, 26 Feb 2015 18:38:47 +0800
> From: Zhaolei <zhaolei@cn.fujitsu.com>
> To: fstests@vger.kernel.org
> Cc: Zhao Lei <zhaolei@cn.fujitsu.com>
> Subject: [PATCH v2 1/2] xfstests: fix a typo in _require_block_device()
> 
> From: Zhao Lei <zhaolei@cn.fujitsu.com>
> 
> We need to check "$1" instead "$SCRATCH_DEV" in this function.
> 
> Changelog v1->v2:
>  Use tab instead of space to fit new code style.
>  Suggested by: Dave Chinner <david@fromorbit.com>

Looks good, thanks.

Reviewed-by: Lukas Czerner <lczerner@redhat.com>

> 
> Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
> ---
>  common/rc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/rc b/common/rc
> index 1ed9df5..5a8c74d 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -1288,7 +1288,7 @@ _require_block_device()
>  		echo "Usage: _require_block_device <dev>" 1>&2
>  		exit 1
>  	fi
> -	if [ "`_is_block_dev $SCRATCH_DEV`" == "" ]; then
> +	if [ "`_is_block_dev $1`" == "" ]; then
>  		_notrun "require $1 to be valid block disk"
>  	fi
>  }
> 
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lukas Czerner Feb. 26, 2015, 1:38 p.m. UTC | #2
On Thu, 26 Feb 2015, Lukáš Czerner wrote:

> Date: Thu, 26 Feb 2015 11:45:12 +0100 (CET)
> From: Lukáš Czerner <lczerner@redhat.com>
> To: Zhaolei <zhaolei@cn.fujitsu.com>
> Cc: fstests@vger.kernel.org
> Subject: Re: [PATCH v2 1/2] xfstests: fix a typo in _require_block_device()
> 
> On Thu, 26 Feb 2015, Zhaolei wrote:
> 
> > Date: Thu, 26 Feb 2015 18:38:47 +0800
> > From: Zhaolei <zhaolei@cn.fujitsu.com>
> > To: fstests@vger.kernel.org
> > Cc: Zhao Lei <zhaolei@cn.fujitsu.com>
> > Subject: [PATCH v2 1/2] xfstests: fix a typo in _require_block_device()
> > 
> > From: Zhao Lei <zhaolei@cn.fujitsu.com>
> > 
> > We need to check "$1" instead "$SCRATCH_DEV" in this function.
> > 
> > Changelog v1->v2:
> >  Use tab instead of space to fit new code style.
> >  Suggested by: Dave Chinner <david@fromorbit.com>
> 
> Looks good, thanks.
> 
> Reviewed-by: Lukas Czerner <lczerner@redhat.com>

Based on the discussion around the second patch you need to use
proper quotes

	if [ "`_is_block_dev "$1"`" == "" ]; then

-Lukas

> 
> > 
> > Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
> > ---
> >  common/rc | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/common/rc b/common/rc
> > index 1ed9df5..5a8c74d 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -1288,7 +1288,7 @@ _require_block_device()
> >  		echo "Usage: _require_block_device <dev>" 1>&2
> >  		exit 1
> >  	fi
> > -	if [ "`_is_block_dev $SCRATCH_DEV`" == "" ]; then
> > +	if [ "`_is_block_dev $1`" == "" ]; then
> >  		_notrun "require $1 to be valid block disk"
> >  	fi
> >  }
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
diff mbox

Patch

diff --git a/common/rc b/common/rc
index 1ed9df5..5a8c74d 100644
--- a/common/rc
+++ b/common/rc
@@ -1288,7 +1288,7 @@  _require_block_device()
 		echo "Usage: _require_block_device <dev>" 1>&2
 		exit 1
 	fi
-	if [ "`_is_block_dev $SCRATCH_DEV`" == "" ]; then
+	if [ "`_is_block_dev $1`" == "" ]; then
 		_notrun "require $1 to be valid block disk"
 	fi
 }