summary refs log tree commit diff
path: root/vm_control
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@chromium.org>2018-02-27 16:55:17 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-03-01 16:13:07 -0800
commitcb47da4910c846bae990ba04cf4d2dd94d0301ff (patch)
tree620faf0bb68270e95df397aea0ddab0a1b8102b8 /vm_control
parent3cbbbe68840e738aae957b1b4c0aa2f54178d576 (diff)
downloadcrosvm-cb47da4910c846bae990ba04cf4d2dd94d0301ff.tar
crosvm-cb47da4910c846bae990ba04cf4d2dd94d0301ff.tar.gz
crosvm-cb47da4910c846bae990ba04cf4d2dd94d0301ff.tar.bz2
crosvm-cb47da4910c846bae990ba04cf4d2dd94d0301ff.tar.lz
crosvm-cb47da4910c846bae990ba04cf4d2dd94d0301ff.tar.xz
crosvm-cb47da4910c846bae990ba04cf4d2dd94d0301ff.tar.zst
crosvm-cb47da4910c846bae990ba04cf4d2dd94d0301ff.zip
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>
Diffstat (limited to 'vm_control')
0 files changed, 0 insertions, 0 deletions