mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
NTB: ntb_test: Fix bug when counting remote files
[ Upstream commit2130c0ba69] 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 <logang@deltatee.com> Acked-by: Allen Hubbe <allenbh@gmail.com> Tested-by: Alexander Fomichev <fomichev.ru@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
db2fe2c502
commit
1b72133e83
@@ -250,7 +250,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)
|
||||
|
||||
Reference in New Issue
Block a user