This patch replaces struct libxlDomainJobObj with generalized virDomainJobObj. Signed-off-by: Kristina Hanicova <khanicov@xxxxxxxxxx> --- src/libxl/libxl_domain.c | 6 +++--- src/libxl/libxl_domain.h | 11 ++--------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 49577d6328..ce515ec54e 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -60,7 +60,7 @@ libxlDomainObjInitJob(libxlDomainObjPrivate *priv) static void libxlDomainObjResetJob(libxlDomainObjPrivate *priv) { - struct libxlDomainJobObj *job = &priv->job; + virDomainJobObj *job = &priv->job; job->active = VIR_JOB_NONE; job->owner = 0; @@ -117,7 +117,7 @@ libxlDomainObjBeginJob(libxlDriverPrivate *driver G_GNUC_UNUSED, error: VIR_WARN("Cannot start job (%s) for domain %s;" - " current job is (%s) owned by (%d)", + " current job is (%s) owned by (%llu)", virDomainJobTypeToString(job), obj->def->name, virDomainJobTypeToString(priv->job.active), @@ -158,7 +158,7 @@ libxlDomainObjEndJob(libxlDriverPrivate *driver G_GNUC_UNUSED, } int -libxlDomainJobUpdateTime(struct libxlDomainJobObj *job) +libxlDomainJobUpdateTime(virDomainJobObj *job) { virDomainJobData *jobData = job->current; unsigned long long now; diff --git a/src/libxl/libxl_domain.h b/src/libxl/libxl_domain.h index 5ce4d518a9..5843a4921f 100644 --- a/src/libxl/libxl_domain.h +++ b/src/libxl/libxl_domain.h @@ -27,13 +27,6 @@ #include "domain_job.h" -struct libxlDomainJobObj { - virCond cond; /* Use to coordinate jobs */ - virDomainJob active; /* Currently running job */ - int owner; /* Thread which set current job */ - virDomainJobData *current; /* Statistics for the current job */ -}; - typedef struct _libxlDomainObjPrivate libxlDomainObjPrivate; struct _libxlDomainObjPrivate { /* console */ @@ -44,7 +37,7 @@ struct _libxlDomainObjPrivate { char *lockState; bool lockProcessRunning; - struct libxlDomainJobObj job; + virDomainJobObj job; bool hookRun; /* true if there was a hook run over this domain */ }; @@ -69,7 +62,7 @@ libxlDomainObjEndJob(libxlDriverPrivate *driver, virDomainObj *obj); int -libxlDomainJobUpdateTime(struct libxlDomainJobObj *job) +libxlDomainJobUpdateTime(virDomainJobObj *job) G_GNUC_WARN_UNUSED_RESULT; char * -- 2.35.3