From 5529b057e79dcca11ea09149c8ba83e589d65cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Thu, 25 Jan 2018 10:53:54 +0000 Subject: [PATCH] cfg: forbid includes of headers in network and storage drivers again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Loadable drivers must never depend on each other. Over time some usage mistakenly crept in for the storage and network drivers, but now this is eliminated the syntax-check rules can enforce this separation once more. Signed-off-by: Daniel P. Berrangé --- cfg.mk | 2 +- src/qemu/qemu_command.c | 1 - src/qemu/qemu_domain.c | 2 -- src/qemu/qemu_migration.c | 1 - src/vz/vz_sdk.c | 1 - 5 files changed, 1 insertion(+), 6 deletions(-) diff --git a/cfg.mk b/cfg.mk index c26556fb2f..78f805b27e 100644 --- a/cfg.mk +++ b/cfg.mk @@ -769,7 +769,7 @@ sc_prohibit_gettext_markup: # lower-level code must not include higher-level headers. cross_dirs=$(patsubst $(srcdir)/src/%.,%,$(wildcard $(srcdir)/src/*/.)) cross_dirs_re=($(subst / ,/|,$(cross_dirs))) -mid_dirs=access|admin|conf|cpu|locking|logging|network|node_device|rpc|security|storage +mid_dirs=access|admin|conf|cpu|locking|logging|rpc|security sc_prohibit_cross_inclusion: @for dir in $(cross_dirs); do \ case $$dir in \ diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 24b434a458..ee4e0b20de 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -51,7 +51,6 @@ #include "snapshot_conf.h" #include "storage_conf.h" #include "secret_conf.h" -#include "network/bridge_driver.h" #include "virnetdevtap.h" #include "virnetdevopenvswitch.h" #include "device_conf.h" diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index db8586360f..84207db16a 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -55,8 +55,6 @@ #include "logging/log_manager.h" #include "locking/domain_lock.h" -#include "storage/storage_driver.h" - #ifdef MAJOR_IN_MKDEV # include #elif MAJOR_IN_SYSMACROS diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index a14e27aac2..3641b801f6 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -58,7 +58,6 @@ #include "virtypedparam.h" #include "virprocess.h" #include "nwfilter_conf.h" -#include "storage/storage_driver.h" #define VIR_FROM_THIS VIR_FROM_QEMU diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index eea5f6fc68..41b09162c3 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -33,7 +33,6 @@ #include "virhostcpu.h" #include "virsocketaddr.h" -#include "storage/storage_driver.h" #include "vz_sdk.h" #define VIR_FROM_THIS VIR_FROM_PARALLELS