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

Re: [Libvir] PATCH 20/20: move the QEMU driver into libvirt.so



Forgot to add the diffstat for this patch. Its not nearly as scary as its
size sugests

 b/qemud/libvirtd.sysconf |    6 
 libvirt.spec.in          |    5 
 qemud/Makefile.am        |   19 -
 qemud/conf.c             |    2 
 qemud/conf.h             |   11 
 qemud/driver.c           |   69 +----
 qemud/driver.h           |    3 
 qemud/internal.h         |    2 
 qemud/libvirtd.init.in   |   12 
 qemud/protocol.x         |  574 -----------------------------------------------
 qemud/qemud.c            |  293 +++++------------------
 qemud/remote.c           |    4 
 src/Makefile.am          |   14 -
 src/libvirt.c            |    7 
 src/remote_internal.c    |   38 ++-
 src/remote_internal.h    |    5 
 16 files changed, 171 insertions(+), 893 deletions(-)


On Fri, Jun 22, 2007 at 03:35:42AM +0100, Daniel P. Berrange wrote:
> This is the final step to move the QEMU code out of the daemon binary and
> into the main libvirt.so library. Practically all of protocol.x goes away
> apart from a single struct representing the header - this should probably
> be moved into remote_protocol.x - or vica-verca. The --remote switch to
> the daemon is removed since its no longer needed. A single --listen switch
> is added to control whether the daemon opens any TCP/IP sockets or not,
> and a config file in /etc/sysconfig/libvirtd is provided to toggle this.
> By default the daemon will only listen on a UNIX socket, unless the admin
> edits /etc/sysconfig/libvirtd to enable TCP - whether it uses TCP or TLS
> is still upto the libvirtd.conf config file.
> 
> The driver.c file is switched over to using virGetDomain and virGetNetwork
> instead of its previous temporary / nasty hack. A qemudRegister function
> is added to make the new implementation be registered.
> 
> The daemon now registers an event loop implementation to be used by the
> QEMU driver. Various bits of code relating to the QEMU protocol are killed
> off in the qemud.c file.
> 
> The remote_internal.c file is adapted so that it will handle qemu:///sesion
> and qemu:///system URLs as if they were  qemu+unix:///session and 
> qemu+unix:///system respectively. It is also adapted so that in the case
> of qemu:///session is uses  $HOME/.libvirt/libvirt-sock for the UNIX domain
> socket path. It is also tweaked to use the abstract namespace if the first
> character is @
> 
> 
> Rather than showing a huge  +10000 lines, -10000 lines diff caused by 
> moving files from qemud/ into src/, i've applied some makefile trickery
> to make libvirt.so compile some files out of qemud/ directly. I intend
> to commit it in this format, and then do the actual file names in a second
> commit. This will avoid mixing functional changes, with plain renames
> to preserve better historical CVS logs. 
> 
> The files to be moved from qemud/ to src/ are:
> 
>    driver.c    -> qemud_driver.c
>    driver.h    -> qemud_driver.h
>    conf.c      -> qemud_conf.c
>    conf.h      -> qemud_conf.h
>    bridge.c
>    bridge.h
>    iptables.c
>    iptables.h
>    uuid.c
>    uuid.h
> 
> The files to be completely deleted are:
>   
>    dispatch.c
>    dispatch.h
>    protocol.c
>    protocol.h
>    protocol.x
>    qemu_internal.c
>    qemu_internal.h
> 
> 
> NB. one feature I've just realized is missing is the autostart of the
> daemon when using  qemu:///session in remote_internal.c. Shouldn't be
> much work to move the neccessary code from qemu_internal.c across.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 


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