Limit SO_BSDCOMPAT warning
Subsystems (3)
PATCH 1/1 Limit SO_BSDCOMPAT warning
Warning a few times for each process is enough.
-Andi
net/core/sock.c renamed from net/core/sock.c-o +8 -2
@@ -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++; + } }/*
Quoted 1 line · On Fri, 24 Oct 2003 22:57:07 +0200 Andi Kleen <[email protected]> wrote:
Warning a few times for each process is enough.
Ok, I'll apply this. I like this version of a patch limiting this message, compared to the others that have been submitted, because it still ensures that every program that has the problem will show up at least one time in the logs.
Thanks Andi.