On Fri, 20 Jul 2007, Andreas Schwab wrote:

Stuart Anderson <[EMAIL PROTECTED]> 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                               [EMAIL PROTECTED]
Network & Software Engineering                   http://www.netsweng.com/
1024D/37A79149:                                  0791 D3B8 9A4C 2CDC A31F
                                                 BD03 0A62 E534 37A7 9149


Reply via email to