]> 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)
commitbf26bdb346f16b0618ebd48d04ac6ff5044cc104
tree759108b04858fe4ff9289f46d88c943898696ca4
parentd82ed113685384ae5ad0782a969992dc91035a3b
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: e08a0c981142 ("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