[libvirt] [PATCH 02/12] libxl: Introduce libxl_domain.[ch]

Jim Fehlig jfehlig at suse.com
Tue Sep 3 22:59:31 UTC 2013


Daniel P. Berrange wrote:
> On Fri, Aug 30, 2013 at 03:46:48PM -0600, Jim Fehlig wrote:
>   
>> Create libxl_domain.[ch] and move all functions operating on
>> libxlDomainObjPrivate to these files.  This will be useful for
>> future patches that e.g. add job support for libxlDomainObjPrivate.
>>
>> Signed-off-by: Jim Fehlig <jfehlig at suse.com>
>> ---
>>  po/POTFILES.in           |   1 +
>>  src/Makefile.am          |   1 +
>>  src/libxl/libxl_conf.c   |   2 +-
>>  src/libxl/libxl_conf.h   |  18 --
>>  src/libxl/libxl_domain.c | 469 +++++++++++++++++++++++++++++++++++++++++++++++
>>  src/libxl/libxl_domain.h |  61 ++++++
>>  src/libxl/libxl_driver.c | 436 +------------------------------------------
>>  7 files changed, 535 insertions(+), 453 deletions(-)
>>
>> diff --git a/po/POTFILES.in b/po/POTFILES.in
>> index 9a83069..281274e 100644
>> --- a/po/POTFILES.in
>> +++ b/po/POTFILES.in
>> @@ -67,6 +67,7 @@ src/lxc/lxc_conf.c
>>  src/lxc/lxc_controller.c
>>  src/lxc/lxc_driver.c
>>  src/lxc/lxc_process.c
>> +src/libxl/libxl_domain.c
>>  src/libxl/libxl_driver.c
>>  src/libxl/libxl_conf.c
>>  src/network/bridge_driver.c
>> diff --git a/src/Makefile.am b/src/Makefile.am
>> index d8b943d..82aefe3 100644
>> --- a/src/Makefile.am
>> +++ b/src/Makefile.am
>> @@ -657,6 +657,7 @@ XENAPI_DRIVER_SOURCES =						\
>>  
>>  LIBXL_DRIVER_SOURCES =						\
>>  		libxl/libxl_conf.c libxl/libxl_conf.h		\
>> +		libxl/libxl_domain.c libxl/libxl_domain.h       \
>>  		libxl/libxl_driver.c libxl/libxl_driver.h
>>  
>>  UML_DRIVER_SOURCES =						\
>> diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
>> index f8937a4..f9ffe5d 100644
>> --- a/src/libxl/libxl_conf.c
>> +++ b/src/libxl/libxl_conf.c
>> @@ -39,7 +39,7 @@
>>  #include "viralloc.h"
>>  #include "viruuid.h"
>>  #include "capabilities.h"
>> -#include "libxl_driver.h"
>> +#include "libxl_domain.h"
>>  #include "libxl_conf.h"
>>  #include "libxl_utils.h"
>>  #include "virstoragefile.h"
>> diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h
>> index 0498012..68e770c 100644
>> --- a/src/libxl/libxl_conf.h
>> +++ b/src/libxl/libxl_conf.h
>> @@ -89,24 +89,6 @@ struct _libxlDriverPrivate {
>>  typedef struct _libxlEventHookInfo libxlEventHookInfo;
>>  typedef libxlEventHookInfo *libxlEventHookInfoPtr;
>>  
>> -typedef struct _libxlDomainObjPrivate libxlDomainObjPrivate;
>> -typedef libxlDomainObjPrivate *libxlDomainObjPrivatePtr;
>> -struct _libxlDomainObjPrivate {
>> -    virObjectLockable parent;
>> -
>> -    /* per domain log stream for libxl messages */
>> -    FILE *logger_file;
>> -    xentoollog_logger *logger;
>> -    /* per domain libxl ctx */
>> -    libxl_ctx *ctx;
>> -    /* console */
>> -    virChrdevsPtr devs;
>> -    libxl_evgen_domain_death *deathW;
>> -
>> -    /* list of libxl timeout registrations */
>> -    libxlEventHookInfoPtr timerRegistrations;
>> -};
>> -
>>  # define LIBXL_SAVE_MAGIC "libvirt-xml\n \0 \r"
>>  # define LIBXL_SAVE_VERSION 1
>>  
>> diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
>> new file mode 100644
>> index 0000000..1d03797
>> --- /dev/null
>> +++ b/src/libxl/libxl_domain.c
>> @@ -0,0 +1,469 @@
>> +/*---------------------------------------------------------------------------*/
>> +/*  Copyright (C) 2011-2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
>>     
>
> It is a pretty minor nitpick, but the normal style 
>
> /*
>  * filename.h: blah description blah
>  *
>  * Copyright (C) 2013 ....
>
>
> without any '/*-------------------....'
>   

Ok, I'll change this and send a followup patch for the other libxl files
that similarly deviate from the norm :).

Regards,
Jim




More information about the libvir-list mailing list