Default gumstix configuration changed
[gumsense-br.git] / package / busybox / busybox-udhcp-log.patch
blob08d21b99c5e288bed4db30b22467ef1a4c9b25f1
1 --- busybox/networking/udhcp-old/Config.in 2003-10-22 02:58:38.000000000 -0700
2 +++ busybox/networking/udhcp/Config.in 2005-02-15 15:22:43.000000000 -0800
3 @@ -58,5 +58,18 @@ config CONFIG_FEATURE_UDHCP_DEBUG
5 See http://udhcp.busybox.net for further details.
7 +config CONFIG_FEATURE_UDHCP_LOG_LEVEL
8 + int " Maximum udhcp message log level"
9 + default 6
10 + depends on CONFIG_UDHCPD || CONFIG_UDHCPC
11 + help
12 + uDHCP has 7 log level for normal log messages and debug messages,
13 + from 0 (EMERGENCY) to 6 (DEBUG). By default, all those messages
14 + go to stdout or in in the syslog ; by reducing the maximum level,
15 + the less important messages won't be generated, which will make
16 + both the program size and log size smaller.
18 + See http://udhcp.busybox.net for further details.
20 endmenu
22 --- busybox/networking/udhcp/common.h.orig 2006-03-22 13:16:19.000000000 -0800
23 +++ busybox/networking/udhcp/common.h 2006-04-19 08:09:08.000000000 -0700
24 @@ -44,7 +44,10 @@
25 void start_log_and_pid(const char *client_server, const char *pidfile);
26 void udhcp_logging(int level, const char *fmt, ...);
28 -#define LOG(level, str, args...) udhcp_logging(level, str, ## args)
29 +/* Test level in here so that the compiler optimise away unused log levels */
30 +#define LOG(level, str, args...) ( ((level) <= UDHCP_LOG_LEVEL) ? \
31 + udhcp_logging(level, str, ## args) : \
32 + 0 )
34 #ifdef UDHCP_DEBUG
35 # define DEBUG(level, str, args...) LOG(level, str, ## args)
36 --- busybox/networking/udhcp-old/libbb_udhcp.h 2004-05-19 02:18:04.000000000 -0700
37 +++ busybox/networking/udhcp/libbb_udhcp.h 2005-02-15 15:22:43.000000000 -0800
38 @@ -22,6 +22,12 @@
39 #define UDHCP_DEBUG
40 #endif
42 +#ifdef CONFIG_FEATURE_UDHCP_LOG_LEVEL
43 +#define UDHCP_LOG_LEVEL CONFIG_FEATURE_UDHCP_LOG_LEVEL
44 +#else
45 +#define UDHCP_LOG_LEVEL 7
46 +#endif
48 #define COMBINED_BINARY
49 #include "version.h"