tee-supplicant: rpmb: introduce readn() wrapper to the read() syscall

read_cid() obtains the ID of the eMMC device by reading from sysfs with
the read() function. Two bytes are read at a time but short reads (i.e.,
when only one byte is returned) and EINTR are not handled. Although I
*think* these situation cannot happen with sysfs, I was unable to find
any guarantee that it is the case. Therefore, introduce a readn()
function which does exactly that.

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