crosvm/sys_util
Dmitry Torokhov cb47da4910 sys_util: fix handling EINTR of C system functions
System functions have 2 ways of signalling errors, either via returning
-1 as result, and setting errno, or directly returning error code, and
we can not distinguish automatically between the 2 options when using
InterruptibleResult trait for i32 values.

Let's remove this trait for i32 and create 2 explicit macros:
handle_eintr_rc and handle_eintr_errno.

TEST=cargo test --features plugin; cargo test -p sys_util
BUG=None

Change-Id: I1dc8e3c023e7bf7875ac3536703eb71fa3206b7b
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/940612
Reviewed-by: Zach Reizner <zachr@chromium.org>
2018-03-01 16:13:07 -08:00
..
src sys_util: fix handling EINTR of C system functions 2018-03-01 16:13:07 -08:00
build.rs fix compiler errors and warnings 2017-08-30 13:04:16 -07:00
Cargo.toml fix dependency versions and add Cargo.lock 2017-09-20 03:39:24 -07:00
sock_ctrl_msg.c fix armv7a and aarch64 build errors and warnings 2017-09-01 12:39:18 -07:00