Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 03 Mar 2005 07:32:22 -0700
From:      Scott Long <scottl@samsco.org>
To:        Alfred Perlstein <alfred@freebsd.org>
Cc:        hackers@freebsd.org
Subject:   Re: truss bug + PATCH, pls review
Message-ID:  <42271FF6.9040103@samsco.org>
In-Reply-To: <20050302212102.GK11079@elvis.mu.org>
References:  <20050302212102.GK11079@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein wrote:
> Can someone review this?  I think 'u' is incorrectly
> added to instead of assigned to.  This causes the initial
> calculation to be garage based and screws up displaying
> poll information.
> 
> I'd like this to be MFC'd before 5.4 if possible.
> 
> Index: syscalls.c
> ===================================================================
> RCS file: /home/ncvs/src/usr.bin/truss/syscalls.c,v
> retrieving revision 1.45
> diff -u -r1.45 syscalls.c
> --- syscalls.c	5 Sep 2004 05:27:30 -0000	1.45
> +++ syscalls.c	2 Mar 2005 21:19:13 -0000
> @@ -414,7 +414,7 @@
>  	(POLLIN | POLLPRI | POLLOUT | POLLERR | POLLHUP | POLLNVAL | \
>  	 POLLRDNORM |POLLRDBAND | POLLWRBAND | POLLINIGNEOF) 
>  
> -	  u += snprintf(tmp + used, per_fd,
> +	  u = snprintf(tmp + used, per_fd,
>  	    "%s%d 0x%hx%s%s%s%s%s%s%s%s%s ",
>  	    i > 0 ? " " : "",
>  	    pfd[i].fd,
> 
> 

I agree with your analysis.

Scott



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42271FF6.9040103>