From 8ad1f163fac75461a216cce5aedabd22b9bf91e2 Mon Sep 17 00:00:00 2001 From: chenwei Date: Mon, 9 Apr 2018 11:22:26 +0800 Subject: [PATCH] API: [BugFix] On success, `ff_sendmsg` return the number of chars sent. --- lib/ff_syscall_wrapper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ff_syscall_wrapper.c b/lib/ff_syscall_wrapper.c index 3e1e484d..cfc407c1 100644 --- a/lib/ff_syscall_wrapper.c +++ b/lib/ff_syscall_wrapper.c @@ -625,6 +625,8 @@ ff_sendmsg(int s, const struct msghdr *msg, int flags) if (rc) goto kern_fail; + rc = curthread->td_retval[0]; + return (rc); kern_fail: ff_os_errno(rc);