]> git.baikalelectronics.ru Git - kernel.git/commit
NTB: ntb_tool: reading the link file should not end in a NULL byte
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 9 Jan 2019 19:22:26 +0000 (12:22 -0700)
committerJon Mason <jdmason@kudzu.us>
Sat, 6 Jun 2020 00:02:08 +0000 (20:02 -0400)
commit6ceb5524ea3623c7501bb61eb414e7397266812a
tree759108b04858fe4ff9289f46d88c943898696ca4
parentd9bfb6293c3fc0d97fc4d424dc03cd0af086d0b8
NTB: ntb_tool: reading the link file should not end in a NULL byte

When running ntb_test this warning is issued:

./ntb_test.sh: line 200: warning: command substitution: ignored null
byte in input

This is caused by the kernel returning one more byte than is necessary
when reading the link file.

Reduce the number of bytes read back to 2 as it was before the
commit that regressed this.

Fixes: e713b4116eea ("NTB: ntb_tool: Add full multi-port NTB API support")
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>
drivers/ntb/test/ntb_tool.c