From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LimuT-0008I1-31 for qemu-devel@nongnu.org; Sun, 15 Mar 2009 05:45:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LimuO-0008HY-6o for qemu-devel@nongnu.org; Sun, 15 Mar 2009 05:45:32 -0400 Received: from [199.232.76.173] (port=46377 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LimuO-0008HV-0K for qemu-devel@nongnu.org; Sun, 15 Mar 2009 05:45:28 -0400 Received: from mtaout03-winn.ispmail.ntl.com ([81.103.221.49]:40934) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LimuN-0007iN-Iq for qemu-devel@nongnu.org; Sun, 15 Mar 2009 05:45:27 -0400 Received: from aamtaout01-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090315094520.GBUR7670.mtaout03-winn.ispmail.ntl.com@aamtaout01-winn.ispmail.ntl.com> for ; Sun, 15 Mar 2009 09:45:20 +0000 Received: from miranda.arrow ([213.107.21.171]) by aamtaout01-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20090315094520.OLQJ13254.aamtaout01-winn.ispmail.ntl.com@miranda.arrow> for ; Sun, 15 Mar 2009 09:45:20 +0000 Received: from sdb by miranda.arrow with local (Exim 4.63) (envelope-from ) id 1LimuD-0006QA-VI for qemu-devel@nongnu.org; Sun, 15 Mar 2009 09:45:18 +0000 Date: Sun, 15 Mar 2009 09:45:17 +0000 From: Stuart Brady Subject: Re: [Qemu-devel] [PATCH] [linux-user] Fix ioctl code generation macros Message-ID: <20090315094517.GA24497@miranda.arrow> References: <1237081212.589.23.camel@coalu.atr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1237081212.589.23.camel@coalu.atr> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Sun, Mar 15, 2009 at 02:40:11AM +0100, Lionel Landwerlin wrote: > Of course, the problem is solved if you're saving the result of the > TARGET_IO* macros in an unsigned integer. > > So here is a little patch that forces TARGET_IO* macros to output > abi_long sized integers. Surely the value currently produced by TARGET_IOC() *is* an unsigned int (provided you use the direction macros)? I'm not sure if any arch will ever need more than 32 bits here, but even with the cast to abi_long, the high bits would be truncated before the cast. target_cmd in IOCTLEntry is an unsigned int, but the command is also passed around as an abi_long is some places... I couldn't see any code that's currently affected by this, though -- did I miss something? Cheers, -- Stuart Brady