From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 2 21:21:02 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9366016A4CE for ; Wed, 2 Mar 2005 21:21:02 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60C4343D54 for ; Wed, 2 Mar 2005 21:21:02 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 5B2385C9E0; Wed, 2 Mar 2005 13:21:02 -0800 (PST) Date: Wed, 2 Mar 2005 13:21:02 -0800 From: Alfred Perlstein To: hackers@freebsd.org Message-ID: <20050302212102.GK11079@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: truss bug + PATCH, pls review X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2005 21:21:02 -0000 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, -- - Alfred Perlstein - Research Engineering Development Inc. - email: bright@mu.org cell: 408-480-4684