qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [5564] Recvmsg must return the number of bytes received ( Lauro Ramos Venancio).
@ 2008-10-28 10:26 Andrzej Zaborowski
  0 siblings, 0 replies; only message in thread
From: Andrzej Zaborowski @ 2008-10-28 10:26 UTC (permalink / raw)
  To: qemu-devel

Revision: 5564
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5564
Author:   balrog
Date:     2008-10-28 10:26:29 +0000 (Tue, 28 Oct 2008)

Log Message:
-----------
Recvmsg must return the number of bytes received (Lauro Ramos Venancio).

Modified Paths:
--------------
    trunk/linux-user/syscall.c

Modified: trunk/linux-user/syscall.c
===================================================================
--- trunk/linux-user/syscall.c	2008-10-28 10:24:11 UTC (rev 5563)
+++ trunk/linux-user/syscall.c	2008-10-28 10:26:29 UTC (rev 5564)
@@ -1160,7 +1160,7 @@
 static abi_long do_sendrecvmsg(int fd, abi_ulong target_msg,
                                int flags, int send)
 {
-    abi_long ret;
+    abi_long ret, len;
     struct target_msghdr *msgp;
     struct msghdr msg;
     int count;
@@ -1199,8 +1199,12 @@
             ret = get_errno(sendmsg(fd, &msg, flags));
     } else {
         ret = get_errno(recvmsg(fd, &msg, flags));
-        if (!is_error(ret))
+        if (!is_error(ret)) {
+            len = ret;
             ret = host_to_target_cmsg(msgp, &msg);
+            if (!is_error(ret))
+                ret = len;
+        }
     }
     unlock_iovec(vec, target_vec, count, !send);
     unlock_user_struct(msgp, target_msg, send ? 0 : 1);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-28 10:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-28 10:26 [Qemu-devel] [5564] Recvmsg must return the number of bytes received ( Lauro Ramos Venancio) Andrzej Zaborowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).