tee-supplicant: read_with_timeout(): fix non-blocking peeking

In case read_with_timeout() is called with *blen == 0 it indicates that
read_with_timeout() should just check how much data is available, and
set how much in *blen and return success. If there is none available it
just also returns success.

Prior to this patch read_with_timeout() was instead returning an error
in case no data was available, this is not expected by the caller so fix
this by returning success in that case instead.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
1 file changed
tree: 7455ea81f4c7e53b3191bec500f3b759db625028
  1. libckteec/
  2. libseteec/
  3. libteec/
  4. public/
  5. scripts/
  6. tee-supplicant/
  7. .gitattributes
  8. .gitignore
  9. .travis.yml
  10. Android.mk
  11. android_flags.mk
  12. CMakeLists.txt
  13. CMakeToolchain.txt
  14. config.mk
  15. flags.mk
  16. LICENSE
  17. Makefile
  18. README.md
  19. typedefs.checkpatch
README.md

OP-TEE Client API

This git contains source code for the non-secure side implementation of the OP-TEE project making up the client library and tee-supplicant.

All official OP-TEE documentation has moved to http://optee.readthedocs.io. The information that used to be here in this git can be found under optee_client.

// OP-TEE core maintainers