| To: | netdev@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH] Limit SO_BSDCOMPAT warning |
| From: | Andi Kleen <ak@xxxxxx> |
| Date: | Fri, 24 Oct 2003 22:57:07 +0200 |
| Cc: | davem@xxxxxxxxxx |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.4i |
Warning a few times for each process is enough.
-Andi
diff -u linux-2.6.0test7/net/core/sock.c-o
linux-2.6.0test7mm1-averell/net/core/sock.c
--- linux-2.6.0test7mm1/net/core/sock.c-o 2003-10-16 05:19:13.000000000
+0200
+++ linux-2.6.0test7mm1/net/core/sock.c 2003-10-24 22:30:46.000000000 +0200
@@ -154,8 +154,14 @@
static void sock_warn_obsolete_bsdism(const char *name)
{
- printk(KERN_WARNING "process `%s' is using obsolete "
- "%s SO_BSDCOMPAT\n", current->comm, name);
+ static int warned;
+ static char warncomm[16];
+ if (strcmp(warncomm, current->comm) && warned < 5) {
+ strcpy(warncomm, current->comm);
+ printk(KERN_WARNING "process `%s' is using obsolete "
+ "%s SO_BSDCOMPAT\n", warncomm, name);
+ warned++;
+ }
}
/*
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [Issues] Implementation for IPv6 MIB:ipv6PrefixTable, kuznet |
|---|---|
| Next by Date: | [PATCH] 2.6.0test8 Goramo PCI200SYN sync serial driver, Krzysztof Halasa |
| Previous by Thread: | possible bug in tcp_input.c, Tomas Szepe |
| Next by Thread: | Re: [PATCH] Limit SO_BSDCOMPAT warning, David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |