Re: [PATCHv2 08/21] fix fallout in src/qemu/

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

 



On 06.03.2013 16:37, Peter Krempa wrote:
> ---
>  src/qemu/qemu_command.c   |   9 ++--
>  src/qemu/qemu_command.h   |   3 ++
>  src/qemu/qemu_conf.c      |  10 ++--
>  src/qemu/qemu_conf.h      |   4 ++
>  src/qemu/qemu_domain.c    |  58 +++++++++-------------
>  src/qemu/qemu_domain.h    |   6 +--
>  src/qemu/qemu_driver.c    | 123 +++++++++++++++++++++-------------------------
>  src/qemu/qemu_migration.c |  22 ++++-----
>  src/qemu/qemu_process.c   | 109 +++++++---------------------------------
>  9 files changed, 130 insertions(+), 214 deletions(-)
> 

> diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h
> index e4db000..a1214d8 100644
> --- a/src/qemu/qemu_command.h
> +++ b/src/qemu/qemu_command.h
> @@ -167,17 +167,20 @@ int qemuOpenVhostNet(virDomainDefPtr def,
>   * *must* decide how to fill in a name in this case
>   */
>  virDomainDefPtr qemuParseCommandLine(virCapsPtr qemuCaps,
> +                                     virDomainXMLConfPtr xmlconf,
>                                       const char **progenv,
>                                       const char **progargv,
>                                       char **pidfile,
>                                       virDomainChrSourceDefPtr *monConfig,
>                                       bool *monJSON);
>  virDomainDefPtr qemuParseCommandLineString(virCapsPtr qemuCaps,
> +                                           virDomainXMLConfPtr xmlconf,
>                                             const char *args,
>                                             char **pidfile,
>                                             virDomainChrSourceDefPtr *monConfig,
>                                             bool *monJSON);
>  virDomainDefPtr qemuParseCommandLinePid(virCapsPtr qemuCaps,
> +                                        virDomainXMLConfPtr xmlconf,
>                                          pid_t pid,
>                                          char **pidfile,
>                                          virDomainChrSourceDefPtr *monConfig,
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index 3ef3499..1beff6d 100644
> --- a/src/qemu/qemu_conf.c
> +++ b/src/qemu/qemu_conf.c
> @@ -551,6 +551,13 @@ virQEMUDriverConfigPtr virQEMUDriverGetConfig(virQEMUDriverPtr driver)
>      return conf;
>  }
> 
> +virDomainXMLConfPtr
> +virQEMUDriverCreateXMLConf(void)
> +{
> +    return virDomainXMLConfNew(&virQEMUDriverPrivateDataCallbacks,
> +                               &virQEMUDriverDomainXMLNamespace);
> +}
> +

Here the wrapper function makes sense as it is used in test suite.

> 
>  virCapsPtr virQEMUDriverCreateCapabilities(virQEMUDriverPtr driver)
>  {
> @@ -573,9 +580,6 @@ virCapsPtr virQEMUDriverCreateCapabilities(virQEMUDriverPtr driver)
>          caps->defaultDiskDriverType = VIR_STORAGE_FILE_RAW;
>      }
> 
> -    qemuDomainSetPrivateDataHooks(caps);
> -    qemuDomainSetNamespaceHooks(caps);
> -
>      if (virGetHostUUID(caps->host.host_uuid)) {
>          virReportError(VIR_ERR_INTERNAL_ERROR,
>                         "%s", _("cannot get the host uuid"));

> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> index 0e56596..2be207f 100644
> --- a/src/qemu/qemu_domain.c
> +++ b/src/qemu/qemu_domain.c
> @@ -205,7 +205,8 @@ qemuDomainTrackJob(enum qemuDomainJob job)
>  }
> 
> 

These down here ....

> -static void *qemuDomainObjPrivateAlloc(void)
> +static void
> +*qemuDomainObjPrivateAlloc(void)
>  {
>      qemuDomainObjPrivatePtr priv;
> 
> @@ -227,7 +228,8 @@ error:
>      return NULL;
>  }
> 
> -static void qemuDomainObjPrivateFree(void *data)
> +static void
> +qemuDomainObjPrivateFree(void *data)
>  {
>      qemuDomainObjPrivatePtr priv = data;
> 
> @@ -256,7 +258,8 @@ static void qemuDomainObjPrivateFree(void *data)
>  }
> 
> 
> -static int qemuDomainObjPrivateXMLFormat(virBufferPtr buf, void *data)
> +static int
> +qemuDomainObjPrivateXMLFormat(virBufferPtr buf, void *data)
>  {
>      qemuDomainObjPrivatePtr priv = data;
>      const char *monitorpath;
> @@ -329,7 +332,8 @@ static int qemuDomainObjPrivateXMLFormat(virBufferPtr buf, void *data)
>      return 0;
>  }
> 
> -static int qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, void *data)
> +static int
> +qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, void *data)
>  {
>      qemuDomainObjPrivatePtr priv = data;
>      char *monitorpath;
> @@ -482,6 +486,14 @@ error:
>  }

... are not really tied to this patch. But I can live with it.

> 
> 
> +virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks = {
> +    .alloc = qemuDomainObjPrivateAlloc,
> +    .free = qemuDomainObjPrivateFree,
> +    .parse = qemuDomainObjPrivateXMLParse,
> +    .format = qemuDomainObjPrivateXMLFormat,
> +};
> +
> +
>  static void
>  qemuDomainDefNamespaceFree(void *nsdata)
>  {

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]