Skip to content
Commit cc874060 authored by Cristian Marussi's avatar Cristian Marussi
Browse files

Introduce and use safe read/write routine



On a POSIX system read/write syscalls can return successfully even when
not all the requested bytes were not read or written.

Introduce 2 wrapper functions to make sure that the read completes only
on EOF (0 bytes) and the write only when the full buffer has been
written out, while still bailing on errors other than -EINTR.

Make use of these new helpers in place of the bare read/write invocation.

Signed-off-by: Cristian Marussi's avatarCristian Marussi <cristian.marussi@arm.com>
parent 62e1a16f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment