qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/3] Sample server that opens image files for QE


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 3/3] Sample server that opens image files for QEMU
Date: Mon, 04 Jun 2012 17:01:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

Am 04.06.2012 15:10, schrieb Corey Bryant:
> This sample server opens image files and passes the fds to QEMU.  The
> paths for two image files are passed as parameters, the first being
> the boot image, and the second being an image to be hot-attached.  The
> server will open the files and pass the fds to QEMU in one of two ways:
> 
>   1) Over the command line (using -drive file=/dev/fd/X) or
>   2) Via the QMP monitor with the getfd command (using SCM_RIGHTS)
>      followed by drive_add (using file=/dev/fd/X) and then
>      device_add.
> 
> Usage:
>   gcc -Wall -o test-fd-passing test-fd-passing.c -L/usr/local/lib -ljson
>   ./test-fd-passing /path/hda.img /path/hdb.img
> 
> Note: This requires json-c and json-c-devel packages.
> 
> Signed-off-by: Corey Bryant <address@hidden>
> ---
>  test-fd-passing.c |  321 
> +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 321 insertions(+)
>  create mode 100644 test-fd-passing.c

Is this meant to be applied or just for reference?

Maybe we can make a proper test case out of it that runs during make
check? Would probably require that the json-c dependency is dropped,
though. Maybe we should rewrite it in Python, as we already have QMP
bindings for that (and there are already tests that use them).

Kevin



reply via email to

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