vcl: fix debug messages output before heap cfg
Change-Id: Ifaef7ab2bc2fd4f5b4822d894facbcae01849031 Signed-off-by: Florin Coras <fcoras@cisco.com>
This commit is contained in:

committed by
Damjan Marion

parent
c6c0d2a077
commit
9686eacfa4
@ -10,6 +10,26 @@ AM_CONDITIONAL([USE_CHECK],[test "$HAVE_CHECK" -eq 1])
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
|
||||
# Check if compiler supports specific flag
|
||||
AC_DEFUN([CC_CHECK_FLAG],
|
||||
[
|
||||
AC_MSG_CHECKING([if $CC supports $1])
|
||||
AC_LANG_PUSH([C])
|
||||
ac_saved_cflags="$CFLAGS"
|
||||
CFLAGS="-Werror $1"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
||||
[cc_flag_check=yes],
|
||||
[cc_flag_check=no]
|
||||
)
|
||||
AC_MSG_RESULT([$cc_flag_check])
|
||||
CFLAGS="$ac_saved_cflags"
|
||||
AC_LANG_POP([C])
|
||||
])
|
||||
|
||||
CC_CHECK_FLAG("-Wno-address-of-packed-member")
|
||||
AS_IF([test "$cc_flag_check" = yes],
|
||||
[CFLAGS="${CFLAGS} -Wno-address-of-packed-member"], [])
|
||||
|
||||
AM_CONDITIONAL(ENABLE_ACL_PLUGIN, test "yes" = "yes")
|
||||
AM_CONDITIONAL(ENABLE_NAT_PLUGIN, test "yes" = "yes")
|
||||
AM_CONDITIONAL(ENABLE_L2E_PLUGIN, test "yes" = "yes")
|
||||
|
@ -501,14 +501,16 @@ vppcom_cfg (vppcom_cfg_t * vcl_cfg)
|
||||
{
|
||||
u32 tmp;
|
||||
if (sscanf (env_var_str, "%u", &tmp) != 1)
|
||||
clib_warning ("VCL<%d>: WARNING: Invalid debug level specified "
|
||||
"in the environment variable " VPPCOM_ENV_DEBUG
|
||||
" (%s)!\n", getpid (), env_var_str);
|
||||
{
|
||||
VCL_CFG_DBG (0, "VCL<%d>: WARNING: Invalid debug level specified "
|
||||
"in the environment variable " VPPCOM_ENV_DEBUG
|
||||
" (%s)!\n", getpid (), env_var_str);
|
||||
}
|
||||
else
|
||||
{
|
||||
vcm->debug = tmp;
|
||||
VDBG (0, "VCL<%d>: configured VCL debug level (%u) from "
|
||||
VPPCOM_ENV_DEBUG "!", getpid (), vcm->debug);
|
||||
VCL_CFG_DBG (0, "VCL<%d>: configured VCL debug level (%u) from "
|
||||
VPPCOM_ENV_DEBUG "!", getpid (), vcm->debug);
|
||||
}
|
||||
}
|
||||
conf_fname = getenv (VPPCOM_ENV_CONF);
|
||||
|
Reference in New Issue
Block a user