On a Wednesday in 2020, Michal Privoznik wrote:
The qemu_domain.c file is big as is and we should split it into
separate semantic blocks. Start with code that handles domain
namespaces.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
po/POTFILES.in | 1 +
src/qemu/Makefile.inc.am | 2 +
src/qemu/qemu_conf.c | 1 +
src/qemu/qemu_domain.c | 1848 +----------------------------
src/qemu/qemu_domain.h | 57 -
src/qemu/qemu_domain_namespace.c | 1885 ++++++++++++++++++++++++++++++
src/qemu/qemu_domain_namespace.h | 86 ++
Is the "domain" part necessary here?
qemu_namespace.c would be enough
src/qemu/qemu_driver.c | 1 +
src/qemu/qemu_hotplug.c | 1 +
src/qemu/qemu_process.c | 1 +
src/qemu/qemu_security.c | 1 +
11 files changed, 1980 insertions(+), 1904 deletions(-)
create mode 100644 src/qemu/qemu_domain_namespace.c
create mode 100644 src/qemu/qemu_domain_namespace.h
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 2058290870..92dc69ce39 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -37,6 +37,7 @@
#include "qemu_blockjob.h"
#include "qemu_checkpoint.h"
#include "qemu_validate.h"
+#include "qemu_domain_namespace.h"
#include "viralloc.h"
#include "virlog.h"
#include "virerror.h"
@@ -65,17 +66,8 @@
#include "virutil.h"
#include "virdevmapper.h"
virdevmapper.h was only used in the namespace code
-#ifdef __linux__
-# include <sys/sysmacros.h>
-#endif
#include <sys/time.h>
#include <fcntl.h>
-#if defined(HAVE_SYS_MOUNT_H)
-# include <sys/mount.h>
-#endif
-#ifdef WITH_SELINUX
-# include <selinux/selinux.h>
-#endif
With the file renamed:
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano