aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-06-06 16:17:04 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-06-06 16:17:04 +0200
commit97d44b02884c2ea7cd35b0ad06975a72fbfee483 (patch)
treeaacc39ece3a29dc7c7c6d0440601bab86c34638b /executor
parent0c5447b340eea47c937da60f6e098bdb01747d81 (diff)
executor: use linux result convention for fuchsia
In several places we assume that -1 is failure and 0 is OK. Use this convention for fuchsia as well.
Diffstat (limited to 'executor')
-rw-r--r--executor/executor_fuchsia.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/executor/executor_fuchsia.cc b/executor/executor_fuchsia.cc
index b0d4f0eef..08ac4e32f 100644
--- a/executor/executor_fuchsia.cc
+++ b/executor/executor_fuchsia.cc
@@ -35,8 +35,10 @@ long execute_syscall(call_t* c, long a0, long a1, long a2, long a3, long a4, lon
{
long res = ZX_ERR_INVALID_ARGS;
NONFAILING(res = c->call(a0, a1, a2, a3, a4, a5, a6, a7, a8));
+ if (res == ZX_OK)
+ return 0;
errno = res;
- return res;
+ return -1;
}
void cover_open()