netutils/ntpclient: make debug message option configurable in .config
authorWonsang Ryou <wonsang.yoo@samsung.com>
Tue, 18 Jul 2017 09:40:16 +0000 (18:40 +0900)
committerEunBong Song <eunb.song@samsung.com>
Wed, 30 Aug 2017 04:15:46 +0000 (21:15 -0700)
This patch enables ntpclient's debug message option to be configurable
in .config. You can set debug message option using the following config
variable.
 - CONFIG_NETUTILS_NTPCLIENT_DEBUG

Change-Id: Idff252265478b6006fe1995ac33e094c097b03e1
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
apps/netutils/ntpclient/Kconfig
apps/netutils/ntpclient/ntpclient.c

index c962f71..fc70f0d 100644 (file)
@@ -24,4 +24,10 @@ config NETUTILS_NTPCLIENT_SIGWAKEUP
        default 18
        depends on !DISABLE_SIGNALS
 
+config NETUTILS_NTPCLIENT_DEBUG
+       bool "NTP client debug message option"
+       default n
+       ---help---
+               Enable NTP client debug message
+
 endif # NETUTILS_NTPCLIENT
index 73377e5..931d5ee 100644 (file)
@@ -85,7 +85,9 @@
 #define NTP2UNIX_TRANLSLATION 2208988800u
 #define NTP_VERSION           3
 
-#define DEBUG_OPTION          0
+#ifndef CONFIG_NETUTILS_NTPCLIENT_DEBUG
+#define CONFIG_NETUTILS_NTPCLIENT_DEBUG                0
+#endif
 
 /****************************************************************************
  * Private Types
@@ -118,7 +120,7 @@ void (*ntp_link_err_cb)(void);
 
 static struct ntpc_daemon_s g_ntpc_daemon;
 static struct ntpc_server_info_s g_ntps;
-static int g_debug = DEBUG_OPTION;
+static int g_debug = CONFIG_NETUTILS_NTPCLIENT_DEBUG;
 
 /****************************************************************************
  * Private Functions Prototype