[libvirt] [PATCH 1/8] Define a QEMU specific API to attach to a running QEMU process

Matthias Bolte matthias.bolte at googlemail.com
Tue Jul 5 10:54:32 UTC 2011


2011/7/4 Daniel P. Berrange <berrange at redhat.com>:
> Introduce a new API in libvirt-qemu.so
>
>  virDomainPtr virDomainQemuAttach(virConnectPtr domain,
>                                  unsigned long long pid,
>                                  unsigned int flags);
>
> This allows libvirtd to attach to an existing, externally
> launched QEMU process. This is useful for QEMU developers who
> prefer to launch QEMU themselves for debugging/devel reasons,
> but still want the benefit of libvirt based tools like
> virt-top, virt-viewer, etc
>
> * include/libvirt/libvirt-qemu.h: Define virDomainQemuAttach
> * src/driver.h, src/libvirt-qemu.c, src/libvirt_qemu.syms:
>  Driver glue for virDomainQemuAttach
> ---
>  include/libvirt/libvirt-qemu.h |    4 +++
>  src/driver.h                   |    6 +++++
>  src/libvirt-qemu.c             |   41 ++++++++++++++++++++++++++++++++++++++++
>  src/libvirt_qemu.syms          |    5 ++++
>  4 files changed, 56 insertions(+), 0 deletions(-)

> +virDomainPtr
> +virDomainQemuAttach(virConnectPtr conn,
> +                    unsigned long long pid,
> +                    unsigned int flags)
> +{
> +    VIR_DEBUG("conn=%p, pid=%llu, flags=%u", conn, pid, flags);

Shouldn't this function have documentation? Hm,
virDomainQemuMonitorCommand isn't documented either.

> diff --git a/src/libvirt_qemu.syms b/src/libvirt_qemu.syms
> index 5702d36..1bb8b62 100644
> --- a/src/libvirt_qemu.syms
> +++ b/src/libvirt_qemu.syms
> @@ -14,3 +14,8 @@ LIBVIRT_QEMU_0.8.3 {
>     global:
>         virDomainQemuMonitorCommand;
>  };
> +
> +LIBVIRT_QEMU_0.9.3 {
> +    global:
> +        virDomainQemuAttach;
> +} LIBVIRT_QEMU_0.8.3;

0.9.3 was released in the meantime, needs to be 0.9.4 now.

ACK.

-- 
Matthias Bolte
http://photron.blogspot.com




More information about the libvir-list mailing list