FS/XFS testing framework
 help / color / mirror / Atom feed
* [PATCH 1/2] xfstests: fix a typo in _require_block_device()
@ 2015-02-16  6:50 Zhaolei
  2015-02-16  6:50 ` [PATCH 2/2] Fix warning of "Usage: _is_block_dev dev" Zhaolei
  2015-02-18  1:21 ` [PATCH 1/2] xfstests: fix a typo in _require_block_device() Dave Chinner
  0 siblings, 2 replies; 10+ messages in thread
From: Zhaolei @ 2015-02-16  6:50 UTC (permalink / raw)
  To: fstests; +Cc: Zhao Lei

From: Zhao Lei <zhaolei@cn.fujitsu.com>

We need to check "$1" instead "$SCRATCH_DEV" in this function.
And make tabs same with other code.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
---
 common/rc | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/common/rc b/common/rc
index 7449a1d..76522d4 100644
--- a/common/rc
+++ b/common/rc
@@ -1284,13 +1284,13 @@ _require_command()
 # $1 - device
 _require_block_device()
 {
-	if [ -z "$1" ]; then
-		echo "Usage: _require_block_device <dev>" 1>&2
-		exit 1
-	fi
-	if [ "`_is_block_dev $SCRATCH_DEV`" == "" ]; then
-		_notrun "require $1 to be valid block disk"
-	fi
+    if [ -z "$1" ]; then
+	echo "Usage: _require_block_device <dev>" 1>&2
+	exit 1
+    fi
+    if [ "`_is_block_dev $1`" == "" ]; then
+	_notrun "require $1 to be valid block disk"
+    fi
 }
 
 # this test requires the device mapper flakey target
-- 
1.8.5.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-02-26 11:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-16  6:50 [PATCH 1/2] xfstests: fix a typo in _require_block_device() Zhaolei
2015-02-16  6:50 ` [PATCH 2/2] Fix warning of "Usage: _is_block_dev dev" Zhaolei
2015-02-18  5:37   ` Dave Chinner
2015-02-26  9:05     ` Zhao Lei
2015-02-26  9:30     ` Zhao Lei
2015-02-18  1:21 ` [PATCH 1/2] xfstests: fix a typo in _require_block_device() Dave Chinner
2015-02-18 10:21   ` Andrew Price
2015-02-18 22:02     ` Dave Chinner
2015-02-26  9:52       ` Lukáš Czerner
2015-02-26 11:41         ` Andrew Price

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox