]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Only complain three times about unhandled ioctls, then shut up. Stops
authorJulian Seward <jseward@acm.org>
Sun, 5 Jan 2003 12:19:35 +0000 (12:19 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 5 Jan 2003 12:19:35 +0000 (12:19 +0000)
it complaining endlessly when running kscd.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1402

coregrind/vg_syscalls.c

index 4d3ea4364f7d8c5a562527a84eb93d1fa519c2d7..2b58b45e2f0042f38524e2eff2bf09e9b2f4e24a 100644 (file)
@@ -2363,16 +2363,20 @@ void VG_(perform_assumed_nonblocking_syscall) ( ThreadId tid )
                     */
                } 
                else if (/* size == 0 || */ dir == _IOC_NONE) {
-                  VG_(message)(Vg_UserMsg, 
-                     "Warning: noted but unhandled ioctl 0x%x"
-                     " with no size/direction hints",
-                     arg2); 
-                  VG_(message)(Vg_UserMsg, 
-                     "   This could cause spurious value errors"
-                     " to appear.");
-                  VG_(message)(Vg_UserMsg, 
-                     "   See README_MISSING_SYSCALL_OR_IOCTL for guidance on"
-                     " writing a proper wrapper." );
+                  static Int moans = 3;
+                  if (moans > 0) {
+                     moans--;
+                     VG_(message)(Vg_UserMsg, 
+                        "Warning: noted but unhandled ioctl 0x%x"
+                        " with no size/direction hints",
+                        arg2); 
+                     VG_(message)(Vg_UserMsg, 
+                        "   This could cause spurious value errors"
+                        " to appear.");
+                     VG_(message)(Vg_UserMsg, 
+                        "   See README_MISSING_SYSCALL_OR_IOCTL for "
+                        "guidance on writing a proper wrapper." );
+                  }
                } else {
                   if ((dir & _IOC_WRITE) && size > 0)
                      SYSCALL_TRACK( pre_mem_read,tst, "ioctl(generic)",