mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
[NET]: Replace CONFIG_NET_DEBUG with sysctl.
Covert network warning messages from a compile time to runtime choice. Removes kernel config option and replaces it with new /proc/sys/net/core/warnings. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ae40eb1ef3
commit
a2a316fd06
6 changed files with 25 additions and 14 deletions
|
@ -1334,14 +1334,12 @@ extern int sock_get_timestampns(struct sock *, struct timespec __user *);
|
|||
/*
|
||||
* Enable debug/info messages
|
||||
*/
|
||||
extern int net_msg_warn;
|
||||
#define NETDEBUG(fmt, args...) \
|
||||
do { if (net_msg_warn) printk(fmt,##args); } while (0)
|
||||
|
||||
#ifdef CONFIG_NETDEBUG
|
||||
#define NETDEBUG(fmt, args...) printk(fmt,##args)
|
||||
#define LIMIT_NETDEBUG(fmt, args...) do { if (net_ratelimit()) printk(fmt,##args); } while(0)
|
||||
#else
|
||||
#define NETDEBUG(fmt, args...) do { } while (0)
|
||||
#define LIMIT_NETDEBUG(fmt, args...) do { } while(0)
|
||||
#endif
|
||||
#define LIMIT_NETDEBUG(fmt, args...) \
|
||||
do { if (net_msg_warn && net_ratelimit()) printk(fmt,##args); } while(0)
|
||||
|
||||
/*
|
||||
* Macros for sleeping on a socket. Use them like this:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue