[dpdk-dev] [PATCH v5 7/9] eal: remove syslog support for windows

Thomas Monjalon thomas at monjalon.net
Mon Jan 27 23:52:18 CET 2020


13/01/2020 22:55, Pallavi Kadam:
> Added #ifndef WIN64 to exclude syslog definitions and parameters
> from Windows builds.
> 
> Signed-off-by: Pallavi Kadam <pallavi.kadam at intel.com>
> Reviewed-by: Ranjit Menon <ranjit.menon at intel.com>
> ---
> --- a/lib/librte_eal/common/eal_common_options.c
> +++ b/lib/librte_eal/common/eal_common_options.c
> @@ -204,9 +206,9 @@ eal_reset_internal_config(struct internal_config *internal_cfg)
>  		internal_cfg->hugepage_info[i].lock_descriptor = -1;
>  	}
>  	internal_cfg->base_virtaddr = 0;
> -

Please keep blank lines

> +#ifndef _WIN64

Could it be #ifdef LOG_DAEMON?

>  	internal_cfg->syslog_facility = LOG_DAEMON;
> -
> +#endif
[..]
> @@ -1391,7 +1395,7 @@ eal_parse_common_option(int opt, const char *optarg,
> +#ifndef _WIN64
>  	case OPT_SYSLOG_NUM:
>  		if (eal_parse_syslog(optarg, conf) < 0) {

Instead of adding #ifdef, I think we could introduce eal_parse_unix_option()
in a separate file, and it would call eal_parse_common_option().
So in Windows, you just skip it by calling directly eal_parse_common_option()
which would be truly common.





More information about the dev mailing list