mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
NTB: ntb_test: Fix bug when counting remote files
[ Upstream commit 2130c0ba69d69bb21f5c52787f2587db00d13d8a ]
When remote files are counted in get_files_count, without using SSH,
the code returns 0 because there is a colon prepended to $LOC. $VPATH
should have been used instead of $LOC.
Fixes: 06bd0407d0 ("NTB: ntb_test: Update ntb_tool Scratchpad tests")
Signed-off-by: Logan Gunthorpe <[email protected]>
Acked-by: Allen Hubbe <[email protected]>
Tested-by: Alexander Fomichev <[email protected]>
Signed-off-by: Jon Mason <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
abf918236a
commit
ad67536d48
1 changed files with 1 additions and 1 deletions
|
|
@ -241,7 +241,7 @@ function get_files_count()
|
|||
split_remote $LOC
|
||||
|
||||
if [[ "$REMOTE" == "" ]]; then
|
||||
echo $(ls -1 "$LOC"/${NAME}* 2>/dev/null | wc -l)
|
||||
echo $(ls -1 "$VPATH"/${NAME}* 2>/dev/null | wc -l)
|
||||
else
|
||||
echo $(ssh "$REMOTE" "ls -1 \"$VPATH\"/${NAME}* | \
|
||||
wc -l" 2> /dev/null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue