qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] migrate to fd - how to use with HMP?


From: Alexey Kardashevskiy
Subject: Re: [Qemu-devel] migrate to fd - how to use with HMP?
Date: Fri, 28 Feb 2014 21:30:33 +1100
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 02/28/2014 09:27 PM, Stefan Hajnoczi wrote:
> On Fri, Feb 28, 2014 at 03:05:12PM +1100, Alexey Kardashevskiy wrote:
>> However once socket_scm_helper talked to "mon" (./qemu.monitor), I cannot
>> get any response from it via "socat UNIX-CONNECT:./qemu.monitor STDIN".
> 
> Have you tried with QMP?  Perhaps the HMP monitor handles
> connect/disconnect differently from the QMP monitor.
> 
> I guess this will require more step-by-step debugging of monitor.c to
> find out what's going on.


One of my questions is still unanswered :) Is socket_scm_helper assumed to
be correct or it is a bug? Because if it is correct, I do not know what to
think. Thanks.


diff --git a/tests/qemu-iotests/socket_scm_helper.c
b/tests/qemu-iotests/socket_scm_helper.c
index 0e2b285..8195983 100644
--- a/tests/qemu-iotests/socket_scm_helper.c
+++ b/tests/qemu-iotests/socket_scm_helper.c
@@ -52,7 +52,7 @@ static int send_fd(int fd, int fd_to_send)
     cmsg->cmsg_len = CMSG_LEN(sizeof(int));
     cmsg->cmsg_level = SOL_SOCKET;
     cmsg->cmsg_type = SCM_RIGHTS;
-    memcpy(CMSG_DATA(cmsg), &fd, sizeof(int));
+    memcpy(CMSG_DATA(cmsg), &fd_to_send, sizeof(int));



-- 
Alexey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]