From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ICEk3-0002IP-4e for qemu-devel@nongnu.org; Sat, 21 Jul 2007 09:11:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ICEk1-0002ID-Nl for qemu-devel@nongnu.org; Sat, 21 Jul 2007 09:11:25 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ICEk1-0002IA-IZ for qemu-devel@nongnu.org; Sat, 21 Jul 2007 09:11:25 -0400 Received: from grayson.netsweng.com ([207.235.77.11]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ICEk1-0003k8-3w for qemu-devel@nongnu.org; Sat, 21 Jul 2007 09:11:25 -0400 Received: from amavis by grayson.netsweng.com with scanned-ok (Exim 3.36 #1 (Debian)) id 1ICEk0-0004T5-00 for ; Sat, 21 Jul 2007 09:11:24 -0400 Received: from grayson.netsweng.com ([127.0.0.1]) by localhost (grayson.netsweng.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id To4WRQayUeiR for ; Sat, 21 Jul 2007 09:10:55 -0400 (EDT) Received: from [71.31.88.35] (helo=trantor.stuart.netsweng.com) by grayson.netsweng.com with esmtp (Exim 3.36 #1 (Debian)) id 1ICEjW-0004PC-00 for ; Sat, 21 Jul 2007 09:10:54 -0400 Date: Sat, 21 Jul 2007 09:10:27 -0400 (EDT) From: Stuart Anderson Subject: Re: [Qemu-devel] [PATCH] linux-user strace In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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 Fri, 20 Jul 2007, Andreas Schwab wrote: > Stuart Anderson writes: > >> Index: qemu/linux-user/syscall.c >> =================================================================== >> --- qemu.orig/linux-user/syscall.c 2007-07-19 01:42:43.000000000 -0400 >> +++ qemu/linux-user/syscall.c 2007-07-19 01:43:18.000000000 -0400 >> @@ -312,6 +312,11 @@ >> return (unsigned long)ret >= (unsigned long)(-4096); >> } >> >> +char *target_strerror(int err) >> +{ >> + return strerror(host_to_target_errno(err)); >> +} >> + > > That looks backwards. strerror surely expects a host errno value, but > host_to_target_errno returns the errno value for the target, doesn't it? The function is called target_strerror() 8-). It is used to display the errno string for the target, not the host. strerror() is just a simple map, so it doesn't really care. Regular strace on qemu itself will give the host error strings. This is used for gettign the error string of the target. Stuart Stuart R. Anderson anderson@netsweng.com Network & Software Engineering http://www.netsweng.com/ 1024D/37A79149: 0791 D3B8 9A4C 2CDC A31F BD03 0A62 E534 37A7 9149