提交 b4c73106 编写于 作者: P Peter Krempa

Disallow inclusion of files from src/conf into src/utils

The utils code should stay separated from other code (except for very
well justified cases). Unfortunately commit 272769be
made it trivial to break the separation (and not get slapped by the
syntax-check rule) by adding -I src/conf to the CFLAGS for utils.

Remove this shortcut and except the two offenders from the syntax check
so that the codebase can be kept separated.
上级 3427b36c
...@@ -1242,3 +1242,6 @@ exclude_file_name_regexp--sc_prohibit_always-defined_macros = \ ...@@ -1242,3 +1242,6 @@ exclude_file_name_regexp--sc_prohibit_always-defined_macros = \
exclude_file_name_regexp--sc_prohibit_readdir = \ exclude_file_name_regexp--sc_prohibit_readdir = \
^tests/.*mock\.c$$ ^tests/.*mock\.c$$
exclude_file_name_regexp--sc_prohibit_cross_inclusion = \
^(src/util/virclosecallbacks\.h|src/util/virhostdev\.h)$$
...@@ -1137,8 +1137,7 @@ libvirt_util_la_SOURCES = \ ...@@ -1137,8 +1137,7 @@ libvirt_util_la_SOURCES = \
libvirt_util_la_CFLAGS = $(CAPNG_CFLAGS) $(YAJL_CFLAGS) $(LIBNL_CFLAGS) \ libvirt_util_la_CFLAGS = $(CAPNG_CFLAGS) $(YAJL_CFLAGS) $(LIBNL_CFLAGS) \
$(AM_CFLAGS) $(AUDIT_CFLAGS) $(DEVMAPPER_CFLAGS) \ $(AM_CFLAGS) $(AUDIT_CFLAGS) $(DEVMAPPER_CFLAGS) \
$(DBUS_CFLAGS) $(LDEXP_LIBM) $(NUMACTL_CFLAGS) \ $(DBUS_CFLAGS) $(LDEXP_LIBM) $(NUMACTL_CFLAGS) \
$(POLKIT_CFLAGS) $(GNUTLS_CFLAGS) $(ACL_CFLAGS) \ $(POLKIT_CFLAGS) $(GNUTLS_CFLAGS) $(ACL_CFLAGS)
-I$(srcdir)/conf
libvirt_util_la_LIBADD = $(CAPNG_LIBS) $(YAJL_LIBS) $(LIBNL_LIBS) \ libvirt_util_la_LIBADD = $(CAPNG_LIBS) $(YAJL_LIBS) $(LIBNL_LIBS) \
$(THREAD_LIBS) $(AUDIT_LIBS) $(DEVMAPPER_LIBS) \ $(THREAD_LIBS) $(AUDIT_LIBS) $(DEVMAPPER_LIBS) \
$(LIB_CLOCK_GETTIME) $(DBUS_LIBS) $(WIN32_EXTRA_LIBS) $(LIBXML_LIBS) \ $(LIB_CLOCK_GETTIME) $(DBUS_LIBS) $(WIN32_EXTRA_LIBS) $(LIBXML_LIBS) \
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#ifndef __VIR_CLOSE_CALLBACKS__ #ifndef __VIR_CLOSE_CALLBACKS__
# define __VIR_CLOSE_CALLBACKS__ # define __VIR_CLOSE_CALLBACKS__
# include "virdomainobjlist.h" # include "conf/virdomainobjlist.h"
typedef struct _virCloseCallbacks virCloseCallbacks; typedef struct _virCloseCallbacks virCloseCallbacks;
typedef virCloseCallbacks *virCloseCallbacksPtr; typedef virCloseCallbacks *virCloseCallbacksPtr;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
# include "virusb.h" # include "virusb.h"
# include "virscsi.h" # include "virscsi.h"
# include "virscsivhost.h" # include "virscsivhost.h"
# include "domain_conf.h" # include "conf/domain_conf.h"
typedef enum { typedef enum {
VIR_HOSTDEV_STRICT_ACS_CHECK = (1 << 0), /* strict acs check */ VIR_HOSTDEV_STRICT_ACS_CHECK = (1 << 0), /* strict acs check */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册