The following patches move job object as a member into the domain
object. Because of this, domain_conf (where the domain object is
defined) needs to import the file with the job object.
It makes sense to move jobs to the same level as the domain_conf:
into src/conf/
Signed-off-by: Kristina Hanicova <khanicov(a)redhat.com>
---
po/POTFILES | 2 +-
src/ch/ch_domain.h | 2 +-
src/conf/meson.build | 1 +
.../domain_job.c => conf/virdomainjob.c} | 6 +--
.../domain_job.h => conf/virdomainjob.h} | 2 +-
src/hypervisor/meson.build | 1 -
src/libvirt_private.syms | 44 +++++++++----------
src/libxl/libxl_domain.c | 1 -
src/libxl/libxl_domain.h | 2 +-
src/lxc/lxc_domain.c | 1 -
src/lxc/lxc_domain.h | 2 +-
src/qemu/qemu_domainjob.h | 2 +-
12 files changed, 32 insertions(+), 34 deletions(-)
rename src/{hypervisor/domain_job.c => conf/virdomainjob.c} (99%)
rename src/{hypervisor/domain_job.h => conf/virdomainjob.h} (99%)
diff --git a/po/POTFILES b/po/POTFILES
index e3a1824834..372e14e031 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -53,6 +53,7 @@ src/conf/storage_conf.c
src/conf/storage_encryption_conf.c
src/conf/storage_source_conf.c
src/conf/virchrdev.c
+src/conf/virdomainjob.c
src/conf/virdomainmomentobjlist.c
src/conf/virdomainobjlist.c
src/conf/virnetworkobj.c
@@ -90,7 +91,6 @@ src/hyperv/hyperv_util.c
src/hyperv/hyperv_wmi.c
src/hypervisor/domain_cgroup.c
src/hypervisor/domain_driver.c
-src/hypervisor/domain_job.c
src/hypervisor/virclosecallbacks.c
src/hypervisor/virhostdev.c
src/interface/interface_backend_netcf.c
diff --git a/src/ch/ch_domain.h b/src/ch/ch_domain.h
index b3bebd6b9a..27efe2feed 100644
--- a/src/ch/ch_domain.h
+++ b/src/ch/ch_domain.h
@@ -24,7 +24,7 @@
#include "ch_monitor.h"
#include "virchrdev.h"
#include "vircgroup.h"
-#include "domain_job.h"
+#include "virdomainjob.h"
/* Give up waiting for mutex after 30 seconds */
#define CH_JOB_WAIT_TIME (1000ull * 30)
diff --git a/src/conf/meson.build b/src/conf/meson.build
index 5ef494c3ba..5116c23fe3 100644
--- a/src/conf/meson.build
+++ b/src/conf/meson.build
@@ -20,6 +20,7 @@ domain_conf_sources = [
'numa_conf.c',
'snapshot_conf.c',
'virdomaincheckpointobjlist.c',
+ 'virdomainjob.c',
'virdomainmomentobjlist.c',
'virdomainobjlist.c',
'virdomainsnapshotobjlist.c',
diff --git a/src/hypervisor/domain_job.c b/src/conf/virdomainjob.c
similarity index 99%
rename from src/hypervisor/domain_job.c
rename to src/conf/virdomainjob.c
index ef3bee0248..80c92f7939 100644
--- a/src/hypervisor/domain_job.c
+++ b/src/conf/virdomainjob.c
@@ -1,5 +1,5 @@
/*
- * domain_job.c: job functions shared between hypervisor drivers
+ * virdomainjob.c: job functions shared between hypervisor drivers
*
* Copyright (C) 2022 Red Hat, Inc.
* SPDX-License-Identifier: LGPL-2.1-or-later
@@ -8,7 +8,7 @@
#include <config.h>
#include <string.h>
-#include "domain_job.h"
+#include "virdomainjob.h"
#include "viralloc.h"
#include "virthreadjob.h"
#include "virlog.h"
@@ -16,7 +16,7 @@
#define VIR_FROM_THIS VIR_FROM_HYPERV
-VIR_LOG_INIT("hypervisor.domain_job");
+VIR_LOG_INIT("conf.virdomainjob");
VIR_ENUM_IMPL(virDomainJob,
diff --git a/src/hypervisor/domain_job.h b/src/conf/virdomainjob.h
similarity index 99%
rename from src/hypervisor/domain_job.h
rename to src/conf/virdomainjob.h
index d7409c05f0..bdfdc91935 100644
--- a/src/hypervisor/domain_job.h
+++ b/src/conf/virdomainjob.h
@@ -1,5 +1,5 @@
/*
- * domain_job.h: job functions shared between hypervisor drivers
+ * virdomainjob.h: job functions shared between hypervisor drivers
*
* Copyright (C) 2022 Red Hat, Inc.
* SPDX-License-Identifier: LGPL-2.1-or-later
diff --git a/src/hypervisor/meson.build b/src/hypervisor/meson.build
index 7532f30ee2..f35565b16b 100644
--- a/src/hypervisor/meson.build
+++ b/src/hypervisor/meson.build
@@ -3,7 +3,6 @@ hypervisor_sources = [
'domain_driver.c',
'virclosecallbacks.c',
'virhostdev.c',
- 'domain_job.c',
]
stateful_driver_source_files += files(hypervisor_sources)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 51efd64ff2..f406fa39ae 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1175,6 +1175,28 @@ virDomainCheckpointUpdateRelations;
virDomainListCheckpoints;
+#conf/virdomainjob.h
+virDomainAgentJobTypeToString;
+virDomainAsyncJobTypeFromString;
+virDomainAsyncJobTypeToString;
+virDomainJobDataCopy;
+virDomainJobDataFree;
+virDomainJobDataInit;
+virDomainJobStatusToType;
+virDomainJobTypeFromString;
+virDomainJobTypeToString;
+virDomainNestedJobAllowed;
+virDomainObjBeginJobInternal;
+virDomainObjCanSetJob;
+virDomainObjClearJob;
+virDomainObjInitJob;
+virDomainObjPreserveJob;
+virDomainObjResetAgentJob;
+virDomainObjResetAsyncJob;
+virDomainObjResetJob;
+virDomainTrackJob;
+
+
# conf/virdomainmomentobjlist.h
virDomainMomentDropChildren;
virDomainMomentDropParent;
@@ -1585,28 +1607,6 @@ virDomainDriverParseBlkioDeviceStr;
virDomainDriverSetupPersistentDefBlkioParams;
-# hypervisor/domain_job.h
-virDomainAgentJobTypeToString;
-virDomainAsyncJobTypeFromString;
-virDomainAsyncJobTypeToString;
-virDomainJobDataCopy;
-virDomainJobDataFree;
-virDomainJobDataInit;
-virDomainJobStatusToType;
-virDomainJobTypeFromString;
-virDomainJobTypeToString;
-virDomainNestedJobAllowed;
-virDomainObjBeginJobInternal;
-virDomainObjCanSetJob;
-virDomainObjClearJob;
-virDomainObjInitJob;
-virDomainObjPreserveJob;
-virDomainObjResetAgentJob;
-virDomainObjResetAsyncJob;
-virDomainObjResetJob;
-virDomainTrackJob;
-
-
# hypervisor/virclosecallbacks.h
virCloseCallbacksGet;
virCloseCallbacksNew;
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index 6695ec670e..aadb13f461 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -37,7 +37,6 @@
#include "xen_common.h"
#include "driver.h"
#include "domain_validate.h"
-#include "domain_job.h"
#define VIR_FROM_THIS VIR_FROM_LIBXL
diff --git a/src/libxl/libxl_domain.h b/src/libxl/libxl_domain.h
index 8ad56f1e88..451e76e311 100644
--- a/src/libxl/libxl_domain.h
+++ b/src/libxl/libxl_domain.h
@@ -24,7 +24,7 @@
#include "libxl_conf.h"
#include "virchrdev.h"
-#include "domain_job.h"
+#include "virdomainjob.h"
typedef struct _libxlDomainObjPrivate libxlDomainObjPrivate;
diff --git a/src/lxc/lxc_domain.c b/src/lxc/lxc_domain.c
index 61e59ec726..f234aaf39c 100644
--- a/src/lxc/lxc_domain.c
+++ b/src/lxc/lxc_domain.c
@@ -29,7 +29,6 @@
#include "virsystemd.h"
#include "virinitctl.h"
#include "domain_driver.h"
-#include "domain_job.h"
#define VIR_FROM_THIS VIR_FROM_LXC
diff --git a/src/lxc/lxc_domain.h b/src/lxc/lxc_domain.h
index 82c36eb940..db622acc86 100644
--- a/src/lxc/lxc_domain.h
+++ b/src/lxc/lxc_domain.h
@@ -25,7 +25,7 @@
#include "lxc_conf.h"
#include "lxc_monitor.h"
#include "virenum.h"
-#include "domain_job.h"
+#include "virdomainjob.h"
typedef enum {
diff --git a/src/qemu/qemu_domainjob.h b/src/qemu/qemu_domainjob.h
index bb3c7ede14..23eadc26a7 100644
--- a/src/qemu/qemu_domainjob.h
+++ b/src/qemu/qemu_domainjob.h
@@ -20,7 +20,7 @@
#include <glib-object.h>
#include "qemu_monitor.h"
-#include "domain_job.h"
+#include "virdomainjob.h"
typedef enum {
--
2.37.1