[PATCH v1 03/34] qemu: Separate out namespace handling code

Ján Tomko jtomko at redhat.com
Fri Jul 24 10:02:09 UTC 2020


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 at 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 at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200724/fe0926d1/attachment-0001.sig>


More information about the libvir-list mailing list