|
From: Tom H. <th...@cy...> - 2004-09-11 15:15:06
|
CVS commit by thughes:
Removed result checks from ioctl POST handlers as the POST handler is
not called unless PostOnFail is set so the checks are redundant.
M +64 -105 vg_syscalls.c 1.141
--- valgrind/coregrind/vg_syscalls.c #1.140:1.141
@@ -3604,5 +3604,4 @@ POST(ioctl)
break;
case TCGETS:
- if (res == 0)
VG_TRACK( post_mem_write, arg3, VKI_SIZEOF_STRUCT_TERMIOS );
break;
@@ -3612,5 +3611,4 @@ POST(ioctl)
break;
case TCGETA:
- if (res == 0)
VG_TRACK( post_mem_write, arg3, VKI_SIZEOF_STRUCT_TERMIO );
break;
@@ -3621,5 +3619,4 @@ POST(ioctl)
break;
case TIOCGWINSZ:
- if (res == 0)
VG_TRACK( post_mem_write, arg3, sizeof(struct winsize) );
break;
@@ -3630,19 +3627,15 @@ POST(ioctl)
break;
case TIOCLINUX:
- if (res == 0)
VG_TRACK( post_mem_write, arg3, sizeof(char *) );
break;
case TIOCGPGRP:
/* Get process group ID for foreground processing group. */
- if (res == 0)
VG_TRACK( post_mem_write, arg3, sizeof(pid_t) );
break;
case TIOCSPGRP:
/* Set a process group ID? */
- if (res == 0)
VG_TRACK( post_mem_write, arg3, sizeof(pid_t) );
break;
case TIOCGPTN: /* Get Pty Number (of pty-mux device) */
- if (res == 0)
VG_TRACK( post_mem_write, arg3, sizeof(int));
break;
@@ -3656,5 +3649,4 @@ POST(ioctl)
break;
case FIONREAD: /* identical to SIOCINQ */
- if (res == 0)
VG_TRACK( post_mem_write, arg3, sizeof(int) );
break;
@@ -3668,10 +3660,8 @@ POST(ioctl)
# if defined(SG_IO)
case SG_IO:
- if (res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(struct sg_io_hdr));
break;
# endif /* SG_IO */
case SG_GET_SCSI_ID:
- if (res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(struct sg_scsi_id));
break;
@@ -3681,9 +3671,7 @@ POST(ioctl)
break;
case SG_GET_RESERVED_SIZE:
- if (res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(int));
break;
case SG_GET_TIMEOUT:
- if (res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(int));
break;
@@ -3704,10 +3692,8 @@ POST(ioctl)
# define ISDN_MAX_CHANNELS 64
# endif
- if (res == 0)
- VG_TRACK( post_mem_write, arg3, ISDN_MAX_CHANNELS
- * 2 * sizeof(unsigned long) );
+ VG_TRACK( post_mem_write, arg3,
+ ISDN_MAX_CHANNELS * 2 * sizeof(unsigned long) );
break;
case VKI_IIOCNETGPN:
- if (res == 0)
VG_TRACK( post_mem_write, arg3, sizeof(isdn_net_ioctl_phone) );
break;
@@ -3715,5 +3701,4 @@ POST(ioctl)
/* These all use struct ifreq AFAIK */
case SIOCGIFINDEX: /* get iface index */
- if (res == 0)
VG_TRACK( post_mem_write,
(UInt)&((struct ifreq *)arg3)->ifr_ifindex,
@@ -3721,5 +3706,4 @@ POST(ioctl)
break;
case SIOCGIFFLAGS: /* get flags */
- if (res == 0)
VG_TRACK( post_mem_write,
(UInt)&((struct ifreq *)arg3)->ifr_flags,
@@ -3727,5 +3711,4 @@ POST(ioctl)
break;
case SIOCGIFHWADDR: /* Get hardware address */
- if (res == 0)
VG_TRACK( post_mem_write,
(UInt)&((struct ifreq *)arg3)->ifr_hwaddr,
@@ -3733,5 +3716,4 @@ POST(ioctl)
break;
case SIOCGIFMTU: /* get MTU size */
- if (res == 0)
VG_TRACK( post_mem_write,
(UInt)&((struct ifreq *)arg3)->ifr_mtu,
@@ -3742,5 +3724,4 @@ POST(ioctl)
case SIOCGIFBRDADDR: /* get broadcast PA address */
case SIOCGIFNETMASK: /* get network PA mask */
- if (res == 0)
VG_TRACK( post_mem_write,
(UInt)&((struct ifreq *)arg3)->ifr_addr,
@@ -3748,5 +3729,4 @@ POST(ioctl)
break;
case SIOCGIFMETRIC: /* get metric */
- if (res == 0)
VG_TRACK( post_mem_write,
(UInt)&((struct ifreq *)arg3)->ifr_metric,
@@ -3754,5 +3734,4 @@ POST(ioctl)
break;
case SIOCGIFMAP: /* Get device parameters */
- if (res == 0)
VG_TRACK( post_mem_write,
(UInt)&((struct ifreq *)arg3)->ifr_map,
@@ -3761,5 +3740,4 @@ POST(ioctl)
break;
case SIOCGIFTXQLEN: /* Get the tx queue length */
- if (res == 0)
VG_TRACK( post_mem_write,
(UInt)&((struct ifreq *)arg3)->ifr_qlen,
@@ -3767,5 +3745,4 @@ POST(ioctl)
break;
case SIOCGIFNAME: /* get iface name */
- if (res == 0)
VG_TRACK( post_mem_write,
(UInt)&((struct ifreq *)arg3)->ifr_name,
@@ -3774,5 +3751,4 @@ POST(ioctl)
#ifdef HAVE_LINUX_MII_H
case SIOCGMIIPHY: /* get hardware entry */
- if (res == 0)
VG_TRACK( post_mem_write,
(UInt)&((struct mii_ioctl_data *)&((struct ifreq *)arg3)->ifr_data)->phy_id,
@@ -3780,5 +3756,4 @@ POST(ioctl)
break;
case SIOCGMIIREG: /* get hardware entry registers */
- if (res == 0)
VG_TRACK( post_mem_write,
(UInt)&((struct mii_ioctl_data *)&((struct ifreq *)arg3)->ifr_data)->val_out,
@@ -3802,5 +3777,4 @@ POST(ioctl)
break;
case SIOCGSTAMP:
- if (res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(struct timeval));
break;
@@ -3810,10 +3784,8 @@ POST(ioctl)
indicated by the third argument of ioctl(2). */
case SIOCOUTQ:
- if (res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(int));
break;
case SIOCGRARP: /* get RARP table entry */
case SIOCGARP: /* get ARP table entry */
- if (res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(struct arpreq));
break;
@@ -3870,5 +3842,4 @@ POST(ioctl)
case (SOUND_PCM_READ_BITS|0x40000000): /* what the fuck ? */
case SOUND_PCM_READ_FILTER:
- if (res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(int));
break;
@@ -3895,5 +3866,4 @@ POST(ioctl)
case SNDCTL_DSP_GETOSPACE:
case SNDCTL_DSP_GETISPACE:
- if (res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(audio_buf_info));
break;
@@ -3920,5 +3890,4 @@ POST(ioctl)
case RTC_RD_TIME:
case RTC_ALM_READ:
- if (res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(struct rtc_time));
break;
@@ -3926,5 +3895,4 @@ POST(ioctl)
break;
case RTC_IRQP_READ:
- if(res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(unsigned long));
break;
@@ -3933,5 +3901,4 @@ POST(ioctl)
# ifdef BLKGETSIZE
case BLKGETSIZE:
- if (res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(unsigned long));
break;
@@ -3940,5 +3907,4 @@ POST(ioctl)
/* Hard disks */
case HDIO_GET_IDENTITY: /* 0x030d */
- if (res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(struct hd_driveid));
break;
@@ -3946,13 +3912,10 @@ POST(ioctl)
/* CD ROM stuff (??) */
case CDROMSUBCHNL:
- if (res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(struct cdrom_subchnl));
break;
case CDROMREADTOCHDR:
- if (res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(struct cdrom_tochdr));
break;
case CDROMREADTOCENTRY:
- if (res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(struct cdrom_tochdr));
break;
@@ -3980,9 +3943,7 @@ POST(ioctl)
case FIGETBSZ:
- if (res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(unsigned long));
break;
case FIBMAP:
- if (res == 0)
VG_TRACK( post_mem_write,arg3, sizeof(unsigned long));
break;
@@ -3990,9 +3951,7 @@ POST(ioctl)
#ifdef HAVE_LINUX_FB_H
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;
|