]> git.hungrycats.org Git - linux/commitdiff
[NET]: Limit SO_BSDCOMPAT warning.
authorAndi Kleen <ak@muc.de>
Fri, 24 Oct 2003 12:53:40 +0000 (05:53 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Fri, 24 Oct 2003 12:53:40 +0000 (05:53 -0700)
net/core/sock.c

index cc811e985cee986d339cb015ee779c2e7e987b28..9d51516eaa56d757cfb596a3e555e5ef42e3d5a3 100644 (file)
@@ -154,8 +154,14 @@ static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen)
 
 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++;
+       }
 }
 
 /*