From 3e1996216ea87c25926aad11d9bb96970ee9238c Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Sun, 20 Mar 2011 11:48:42 +0200 Subject: [PATCH] Add support for setting the syslog facility from the config file This enables setting the syslog facility at build time. --- src/utils/wpa_debug.c | 6 +++++- wpa_supplicant/Makefile | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/utils/wpa_debug.c b/src/utils/wpa_debug.c index ba554efd3..b8c5e2fe4 100644 --- a/src/utils/wpa_debug.c +++ b/src/utils/wpa_debug.c @@ -78,9 +78,13 @@ void wpa_debug_print_timestamp(void) #ifdef CONFIG_DEBUG_SYSLOG +#ifndef LOG_HOSTAPD +#define LOG_HOSTAPD LOG_DAEMON +#endif /* LOG_HOSTAPD */ + void wpa_debug_open_syslog(void) { - openlog("wpa_supplicant", LOG_PID | LOG_NDELAY, LOG_DAEMON); + openlog("wpa_supplicant", LOG_PID | LOG_NDELAY, LOG_HOSTAPD); wpa_debug_syslog++; } diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index 19cc68503..aeb9ab98a 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -1225,6 +1225,9 @@ endif ifdef CONFIG_DEBUG_SYSLOG CFLAGS += -DCONFIG_DEBUG_SYSLOG +ifdef CONFIG_DEBUG_SYSLOG_FACILITY +CFLAGS += -DLOG_HOSTAPD="$(CONFIG_DEBUG_SYSLOG_FACILITY)" +endif endif ifdef CONFIG_DEBUG_FILE