This patch replaces struct virCHDomainJobObj with generalized
virDomainJobObj.
Signed-off-by: Kristina Hanicova <khanicov(a)redhat.com>
---
src/ch/ch_domain.c | 4 ++--
src/ch/ch_domain.h | 9 +--------
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c
index 62a6f7a9d6..2afb3582b1 100644
--- a/src/ch/ch_domain.c
+++ b/src/ch/ch_domain.c
@@ -46,7 +46,7 @@ virCHDomainObjInitJob(virCHDomainObjPrivate *priv)
static void
virCHDomainObjResetJob(virCHDomainObjPrivate *priv)
{
- struct virCHDomainJobObj *job = &priv->job;
+ virDomainJobObj *job = &priv->job;
job->active = VIR_JOB_NONE;
job->owner = 0;
@@ -83,7 +83,7 @@ virCHDomainObjBeginJob(virDomainObj *obj, virDomainJob job)
virDomainJobTypeToString(job));
if (virCondWaitUntil(&priv->job.cond, &obj->parent.lock, then) <
0) {
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),
diff --git a/src/ch/ch_domain.h b/src/ch/ch_domain.h
index f75a08ec87..b3bebd6b9a 100644
--- a/src/ch/ch_domain.h
+++ b/src/ch/ch_domain.h
@@ -30,16 +30,9 @@
#define CH_JOB_WAIT_TIME (1000ull * 30)
-struct virCHDomainJobObj {
- virCond cond; /* Use to coordinate jobs */
- virDomainJob active; /* Currently running job */
- int owner; /* Thread which set current job */
-};
-
-
typedef struct _virCHDomainObjPrivate virCHDomainObjPrivate;
struct _virCHDomainObjPrivate {
- struct virCHDomainJobObj job;
+ virDomainJobObj job;
virChrdevs *chrdevs;
virCHDriver *driver;
--
2.35.3