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: Stefan Hajnoczi
Subject: Re: [Qemu-devel] migrate to fd - how to use with HMP?
Date: Fri, 28 Feb 2014 17:55:26 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Feb 28, 2014 at 09:30:33PM +1100, Alexey Kardashevskiy wrote:
> 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));

Don't assume the 045 test or socket_scm_helper is correct.  Your patch
makes sense.  Please post it to qemu-devel.

Stefan



reply via email to

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