cfg: forbid includes of headers in network and storage drivers again

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é <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2018-01-25 10:53:54 +00:00
parent a1f6030def
commit 5529b057e7
5 changed files with 1 additions and 6 deletions

2
cfg.mk
View File

@ -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 \

View File

@ -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"

View File

@ -55,8 +55,6 @@
#include "logging/log_manager.h"
#include "locking/domain_lock.h"
#include "storage/storage_driver.h"
#ifdef MAJOR_IN_MKDEV
# include <sys/mkdev.h>
#elif MAJOR_IN_SYSMACROS

View File

@ -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

View File

@ -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