]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
merge (in effect, and without docs) revs:
authorJulian Seward <jseward@acm.org>
Sun, 20 Oct 2002 18:11:49 +0000 (18:11 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 20 Oct 2002 18:11:49 +0000 (18:11 +0000)
   valgrind.in       1.17.2.3
   vg_syscall_mem.c 1.58.2.12

Add Jeremy Fitzhardinge's --weird-hacks=lax-ioctls patch, and add some docs.

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

coregrind/vg_main.c
coregrind/vg_syscalls.c

index de238bbf404be3f49e83b8335349f1aff81c3a40..23843ac6f468f8dfb5f1b7b17d1f55c4064233b1 100644 (file)
@@ -630,7 +630,7 @@ static void usage ( void )
 "    --suppressions=<filename> suppress errors described in\n"
 "                              suppressions file <filename>\n"
 "    --weird-hacks=hack1,hack2,...  [no hacks selected]\n"
-"         recognised hacks are: ioctl-VTIME truncate-writes\n"
+"         recognised hacks are: ioctl-VTIME truncate-writes lax-ioctls\n"
 "\n"
 "  %s skin user options:\n";
 
index f5dcf5306e7b6b819948c30956d6a69ee582f94f..7d1a48fe051f05e57e76562e470762957515d231 100644 (file)
@@ -2311,7 +2311,17 @@ void VG_(perform_assumed_nonblocking_syscall) ( ThreadId tid )
             default: {
                UInt dir  = _IOC_DIR(arg2);
                UInt size = _IOC_SIZE(arg2);
-               if (/* size == 0 || */ dir == _IOC_NONE) {
+               if (VG_(strstr)(VG_(clo_weird_hacks), "lax-ioctls") != NULL) {
+                   /* 
+                    * Be very lax about ioctl handling; the only
+                    * assumption is that the size is correct. Doesn't
+                    * require the full buffer to be initialized when
+                    * writing.  Without this, using some device
+                    * drivers with a large number of strange ioctl
+                    * commands becomes very tiresome.
+                    */
+               } 
+               else if (/* size == 0 || */ dir == _IOC_NONE) {
                   VG_(message)(Vg_UserMsg, 
                      "Warning: noted but unhandled ioctl 0x%x"
                      " with no size/direction hints",