From: Tom Hughes Date: Wed, 21 Apr 2004 15:52:33 +0000 (+0000) Subject: Add support for the FBIOGET_VSCREENINFO and FBIOGET_FSCREENINFO ioctls X-Git-Tag: svn/VALGRIND_2_1_2~126 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e14c5dc6ed171f84720a3030cefaf10568a7fa36;p=thirdparty%2Fvalgrind.git Add support for the FBIOGET_VSCREENINFO and FBIOGET_FSCREENINFO ioctls based on a patch from Paul Olav Tvete . CCMAIL: 77022-done@bugs.kde.org git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2381 --- diff --git a/coregrind/vg_syscalls.c b/coregrind/vg_syscalls.c index 3e70eb5c14..31f5d49161 100644 --- a/coregrind/vg_syscalls.c +++ b/coregrind/vg_syscalls.c @@ -3230,6 +3230,17 @@ PRE(ioctl) case CDROM_DRIVE_STATUS: /* 0x5326 */ case CDROM_CLEAR_OPTIONS: /* 0x5321 */ break; + + case FBIOGET_VSCREENINFO: /* 0x4600 */ + SYSCALL_TRACK( pre_mem_write,tid, + "ioctl(FBIOGET_VSCREENINFO)", arg3, + sizeof(struct fb_var_screeninfo)); + break; + case FBIOGET_FSCREENINFO: /* 0x4602 */ + SYSCALL_TRACK( pre_mem_write,tid, + "ioctl(FBIOGET_FSCREENINFO)", arg3, + sizeof(struct fb_fix_screeninfo)); + break; /* We don't have any specific information on it, so try to do something reasonable based on direction and @@ -3584,6 +3595,15 @@ POST(ioctl) case CDROM_CLEAR_OPTIONS: /* 0x5321 */ break; + case FBIOGET_VSCREENINFO: //0x4600 + if (res == 0) + VG_TRACK( post_mem_write,arg3, sizeof(struct fb_var_screeninfo)); + break; + case FBIOGET_FSCREENINFO: //0x4602 + if (res == 0) + VG_TRACK( post_mem_write,arg3, sizeof(struct fb_fix_screeninfo)); + break; + /* We don't have any specific information on it, so try to do something reasonable based on direction and size bits. The encoding scheme is described in diff --git a/coregrind/vg_unsafe.h b/coregrind/vg_unsafe.h index 65c451ec67..2e86f252bd 100644 --- a/coregrind/vg_unsafe.h +++ b/coregrind/vg_unsafe.h @@ -63,6 +63,7 @@ #include /* for cd-rom ioctls */ #include /* for siginfo_t */ #include /* for adjtimex */ +#include /* for fb_* structs */ #define __USE_LARGEFILE64 #include /* for struct stat */